Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
I need to try array B-) solution in Clear category for Hotel Hosting Costs by U.V
# I need to try array
import array
def hotel_cost(rate: int, incr: int, day: int) -> int:
x = array.array('L') * 31
for d in range(0, 32):
cost = (rate + (min(d, 15) - 1) * incr)
p = (32 - d) * cost
x.append(p)
return x[day]
Sept. 9, 2025