Advertisement
sanyakasarova

09. Moving

Jun 5th, 2021
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. width = int(input())
  2. length = int(input())
  3. height = int(input())
  4.  
  5. free_space = width * length * height # volume of the free space
  6.  
  7. command = input()
  8. while command != "Done":
  9. num_of_boxes = int(command)
  10. free_space -= num_of_boxes
  11.  
  12. if free_space <= 0:
  13. print(f"No more free space! You need {abs(free_space)} Cubic meters more.")
  14. break
  15.  
  16. command = input()
  17.  
  18. if command == "Done":
  19. print(f"{free_space} Cubic meters left.")
  20.  
  21.  
  22.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement