Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- width = int(input())
- length = int(input())
- height = int(input())
- free_space = width * length * height
- initial_space = free_space
- total_space = 0
- rest = 0
- command = input()
- while command != "Done" and free_space - int(command) > 0:
- boxes = int(command)
- free_space -= boxes
- command = input()
- if command == 'Done':
- print(f"{free_space} Cubic meters left.")
- else:
- rest = abs(free_space - int(command))
- print(f"No more free space! You need {rest} Cubic meters more.")
Advertisement
Add Comment
Please, Sign In to add comment