Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- days = int(input())
- players = int(input())
- total_energy = float(input())
- daily_water_pp = float(input())
- daily_food_pp = float(input())
- water_needed = daily_water_pp * days * players
- food_needed = daily_food_pp * days * players
- curr_water = water_needed
- curr_food = food_needed
- flag = True
- for i in range(1, days + 1):
- wood_chop = float(input())
- if total_energy > 0:
- total_energy -= wood_chop
- else:
- flag = False
- print(f"You will run out of energy. You will be left with {curr_food:.2f} food and {curr_water:.2f} water.")
- break
- if i % 2 == 0:
- total_energy += total_energy / 20
- curr_water -= curr_water * 3 / 10
- if i % 3 == 0:
- total_energy += total_energy / 10
- curr_food -= curr_food / players
- if flag:
- print(f"You are ready for the quest. You will be left with - {total_energy:.2f} energy!")
Advertisement
Add Comment
Please, Sign In to add comment