Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 2. Вело състезание
- num_juniors = int(input())
- num_seniors = int(input())
- route = str(input())
- junior_ticket = 0
- senior_ticket = 0
- total_tickets = num_juniors + num_seniors
- if route == "trail":
- junior_ticket = 5.50
- senior_ticket = 7
- elif route == "cross-country":
- junior_ticket = 8
- senior_ticket = 9.50
- elif route == "downhill":
- junior_ticket = 12.25
- senior_ticket = 13.75
- elif route == "road":
- junior_ticket = 20
- senior_ticket = 21.50
- income = num_juniors * junior_ticket + num_seniors * senior_ticket
- if total_tickets >= 50 and route == "cross-country":
- income *= 0.75
- expense = income * 0.05
- charitable_amount = income - expense
- print(f"{charitable_amount:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment