Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- width = int(input())
- length = int(input())
- total_pieces = width * length / 1
- command = ''
- while command != 'stop' and total_pieces > 0:
- command = input().lower()
- if command.isnumeric():
- total_pieces -= int(command)
- else:
- break
- if total_pieces > 0:
- print('%d pieces are left.' % total_pieces)
- else:
- print('No more cake left! You need %d pieces more.' % abs(total_pieces))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement