Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- piece_of_cake = int(input()) * int(input())
- hungry = 0
- while piece_of_cake >= hungry:
- command = input()
- if command == "STOP":
- break
- hungry += int(command)
- if piece_of_cake >= hungry:
- print(f'{piece_of_cake - hungry} pieces are left.')
- else:
- print(f'No more cake left! You need {hungry - piece_of_cake} pieces more.')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement