Advertisement
Spocoman

10. Gladiator Expenses

Jan 19th, 2022
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.57 KB | None | 0 0
  1. lost_fight = int(input())
  2. helmet = float(input())
  3. sword = float(input())
  4. shield = float(input())
  5. armour = float(input())
  6.  
  7. price = int(lost_fight / 2) * helmet + int(lost_fight / 3) * sword + int(lost_fight / 6) * shield + int(lost_fight / 12) * armour
  8. print(f'Gladiator expenses: {price:.2f} aureus')
  9.  
  10.  
  11.  
  12. Тарикатско решение:)
  13.  
  14. lost_fight = int(input())
  15.  
  16. print(f'Gladiator expenses: {(int(lost_fight / 2) * float(input()) + int(lost_fight / 3) * float(input()) + int(lost_fight / 6) * float(input()) + int(lost_fight / 12) * float(input())):.2f} aureus')
  17.  
  18.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement