Advertisement
Spocoman

Deer of Santa

Feb 13th, 2022
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. import math
  2.  
  3. days = int(input())
  4. food = int(input())
  5. deer1 = float(input())
  6. deer2 = float(input())
  7. deer3 = float(input())
  8. needed_food = (deer1 + deer2 + deer3) * days
  9.  
  10. if food - needed_food >= 0:
  11.     print(f"{math.floor(food - needed_food)} kilos of food left.")
  12. else:
  13.     print(f"{math. ceil(needed_food - food)} more kilos of food are needed.")
  14.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement