Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- days = int(input())
- food = int(input())
- deer1 = float(input())
- deer2 = float(input())
- deer3 = float(input())
- needed_food = (deer1 + deer2 + deer3) * days
- if food - needed_food >= 0:
- print(f"{math.floor(food - needed_food)} kilos of food left.")
- else:
- print(f"{math. ceil(needed_food - food)} more kilos of food are needed.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement