Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- junior_bikers = int(input())
- senior_bikers = int(input())
- type_of_the_race = input()
- bills = 0
- total_sum = 0
- final_sum = 0
- discount = 0
- total_bikers = senior_bikers + junior_bikers
- if type_of_the_race == "trail":
- total_sum = (junior_bikers * 5.50) + (senior_bikers * 7)
- elif type_of_the_race == "cross-country":
- total_sum = (junior_bikers * 8) + (senior_bikers * 9.50)
- if total_bikers >= 50:
- discount = total_sum * 0.25
- elif type_of_the_race == "downhill":
- total_sum = (junior_bikers * 12.25) + (senior_bikers * 13.75)
- elif type_of_the_race == "road":
- total_sum = (junior_bikers * 20) + (senior_bikers * 21.50)
- total_sum_with_discount = total_sum - discount
- bills = total_sum_with_discount * 0.05
- final_sum = total_sum_with_discount - bills
- print(f"{final_sum:.2f}")
Advertisement
Add Comment
Please, Sign In to add comment