Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- seats = int(input())
- people_sum = 0
- money = 0
- while True:
- try:
- visitors = int(input())
- people_sum += visitors
- if people_sum > seats:
- print("")
- print("The cinema is full.")
- print(f"Cinema income - {money} lv.")
- break
- if visitors % 3 == 0:
- money += (visitors * 5) - 5
- else:
- money += visitors * 5
- except ValueError:
- print(f"There are {seats - people_sum} seats left in the cinema.")
- print(f"Cinema income - {money} lv.")
- break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement