Advertisement
simeonshopov

The Hunting Games

Jan 28th, 2020
249
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.86 KB | None | 0 0
  1. adv_days = int(input())
  2. player_count = int(input())
  3. group_energy = float(input())
  4. water_day_person = float(input())
  5. food_day_person = float(input())
  6.  
  7. total_water = water_day_person * player_count * adv_days
  8. total_food = food_day_person * player_count * adv_days
  9.  
  10. quest = True
  11.  
  12. for day in range(1, adv_days + 1):
  13.     energy_loss = float(input())
  14.     group_energy -= energy_loss
  15.     if group_energy <= 0:
  16.         quest = False
  17.         break
  18.     if day % 2 == 0:
  19.         group_energy += group_energy * 0.05
  20.         total_water *= 0.7
  21.     if day % 3 == 0:
  22.         total_food -= total_food / player_count
  23.         group_energy *= 1.1
  24.  
  25. if quest:
  26.     print(f'You are ready for the quest. You will be left with - {group_energy:.2f} energy!')
  27. else:
  28.     print(f'You will run out of energy. You will be left with {total_food:.2f} food and {total_water:.2f} water.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement