Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- players = int(input())
- energy = float(input())
- water_per_day = float(input())
- food_per_day = float(input())
- total_water = players * water_per_day * days
- total_food = players * food_per_day * days
- no_energy = False
- for each_day in range(1, days + 1):
- lost_energy = float(input())
- energy -= lost_energy
- if each_day % 2 == 0:
- energy += energy * 0.05
- total_water -= total_water * 0.3
- if each_day % 3 == 0:
- total_food -= total_food / players
- energy *= 1.10
- if energy <= 0:
- no_energy = True
- break
- if no_energy:
- print(f'You will run out of energy. You will be left with {total_food:.2f} food and {total_water:.2f} water.')
- else:
- print(f'You are ready for the quest. You will be left with - {energy:.2f} energy!')
Advertisement
Add Comment
Please, Sign In to add comment