BbJLeB

08. Moving

May 13th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.35 KB | None | 0 0
  1. w = int(input())
  2. l = int(input())
  3. h = int(input())
  4.  
  5. all_space = w * l * h
  6.  
  7. while all_space > 0:
  8.     boxes = input()
  9.  
  10.     if boxes == "Done":
  11.         print(f"{all_space} Cubic meters left.")
  12.         break
  13.  
  14.     all_space -= int(boxes)
  15.  
  16. if not boxes == "Done":
  17.     print(f"No more free space! You need {abs(all_space)} Cubic meters more.")
Advertisement
Add Comment
Please, Sign In to add comment