Advertisement
veronikaaa86

07. Moving

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