Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- day_limit = 0
- for day in range(days):
- day_limit += 60
- product_counter = 0
- money_left_day = 0
- command = input()
- while command != "Day over":
- product_counter += 1
- price_product = float(command)
- if day_limit >= price_product:
- day_limit -= price_product
- if day_limit == 0:
- print(f"Daily limit exceeded! You've bought {product_counter} products.")
- break
- command = input()
- if command == "Day over":
- print(f"Money left from today: {day_limit}. You've bought {price_product} products.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement