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