Advertisement
simeonshopov

Renovation

Oct 11th, 2019
169
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.62 KB | None | 0 0
  1. import math
  2.  
  3. height = int(input())
  4. width = int(input())
  5. skip_surface = int(input())
  6. total_surface = height * width * 4
  7. total_paint_surface = math.ceil(total_surface - (total_surface * (skip_surface / 100)))
  8. painted = 0
  9.  
  10. while True:
  11.   paint = input()
  12.   if paint == "Tired!":
  13.     print(f"{total_paint_surface - painted} quadratic m left.")
  14.     break
  15.   painted += int(paint)
  16.   if painted > total_paint_surface:
  17.     print(f"All walls are painted and you have {painted - total_paint_surface} l paint left!")
  18.     break
  19.   elif painted == total_paint_surface:
  20.     print("All walls are painted! Great job, Pesho!")
  21.     break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement