Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- detergent = int(input()) * 750
- loads = 1
- command = ''
- plates = 0
- pots = 0
- while command != 'End' and detergent > 0:
- command = input()
- if command.isnumeric():
- command = int(command)
- else:
- break
- if loads == 3:
- loads = 1
- pots += command
- detergent_used = command * 15
- detergent -= detergent_used
- else:
- loads += 1
- plates += command
- detergent_used = command * 5
- detergent -= detergent_used
- if detergent >= 0:
- print(f'Detergent was enough!\n{plates} dishes and {pots} pots were washed.\nLeftover detergent {abs(detergent)} ml.')
- else:
- print(f'Not enough detergent, {abs(detergent)} ml. more necessary!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement