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