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