Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- width = int(input())
- length = int(input())
- height = int(input())
- total_boxes = 0
- total_space = width * length * height
- initial_space = total_space
- is_there_more_space = True
- command = input()
- while command != 'Done':
- number_of_boxes = int(command)
- total_boxes += number_of_boxes
- total_space -= number_of_boxes
- if total_space <= 0:
- is_there_more_space = False
- break
- command = input()
- if is_there_more_space:
- left_space = initial_space - total_boxes
- print(f"{left_space} Cubic meters left.")
- else:
- needed_space = total_boxes - initial_space
- print(f"No more free space! You need {needed_space} Cubic meters more.")
Advertisement
Add Comment
Please, Sign In to add comment