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