Sichanov

sss

May 9th, 2021
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.68 KB | None | 0 0
  1. width = int(input())
  2. length = int(input())
  3. height = int(input())
  4. total_space = width * length * height
  5.  
  6. width_of_kashon = 1
  7. length_of_kashon = 1
  8. height_of_kashon = 1
  9. total_space_of_box = 1
  10.  
  11. number_of_boxes = str(input())
  12. broi_kashoni = 0
  13.  
  14. while number_of_boxes != "Done":
  15.     kashoni = int(number_of_boxes)
  16.     broi_kashoni += kashoni
  17.  
  18.     if total_space < broi_kashoni:
  19.         difference = abs(total_space - broi_kashoni)
  20.         print(f"No more free space! You need {difference} Cubic meters more.")
  21.         break
  22.     number_of_boxes = input()
  23.  
  24. if number_of_boxes == "Done":
  25.     difference = abs(total_space - broi_kashoni)
  26.     print(f"{difference} Cubic meters left.")
Advertisement
Add Comment
Please, Sign In to add comment