Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- lost_fights = int(input())
- helmet_price = float(input())
- sword_price = float(input())
- shield_price = float(input())
- armor_price = float(input())
- budget = 0
- shield_breaks = 0
- for fight in range(1, lost_fights+1):
- if fight % 2 == 0:
- budget += helmet_price
- if fight % 3 == 0:
- budget += sword_price
- if fight % 3 == 0 and fight % 2 == 0:
- budget += shield_price
- shield_breaks += 1
- if shield_breaks == 2:
- budget += armor_price
- shield_breaks = -1
- print(f'Gladiator expenses: {budget:.2f} aureus')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement