Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- food = int(input()) * 1000
- line = input()
- total_food_eaten = 0
- while line != "Adopted":
- food_eaten = int(line)
- total_food_eaten += food_eaten
- line = input()
- if food >= total_food_eaten:
- print(f"Food is enough! Leftovers: {food - total_food_eaten} grams.")
- else:
- print(f"Food is not enough. You need {total_food_eaten - food} grams more.")
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement