Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- capacity = int(input())
- commant = input()
- number_of_people = 0
- counter = 0
- income = 0
- while commant != "Movie time!":
- number_of_people = int(commant)
- counter += number_of_people
- if counter <= capacity:
- if number_of_people % 3 == 0:
- income += number_of_people * 5 - 5
- else:
- income += number_of_people * 5
- else:
- print("The cinema is full.")
- print(f"Cinema income - {income} lv.")
- break
- commant = input()
- if commant == "Movie time!":
- print(f"There are {abs(capacity-counter)} seats left in the cinema.")
- print(f"Cinema income - {income} lv.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement