Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- singer_cost = int(input())
- guests = 0
- total_budget = 0
- while True:
- incoming_guests = input()
- if incoming_guests == "The restaurant is full":
- break
- incoming_guests = int(incoming_guests)
- if incoming_guests < 5:
- guests += incoming_guests
- total_budget += incoming_guests * 100
- else:
- guests += incoming_guests
- total_budget += incoming_guests * 70
- diff = total_budget - singer_cost
- if diff >= 0:
- print(f"You have {guests} guests and {diff} leva left.")
- else:
- print(f"You have {guests} guests and {total_budget} leva income, but no singer.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement