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