Advertisement
im11

Untitled

Nov 23rd, 2021
1,102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.55 KB | None | 0 0
  1. from math import ceil
  2.  
  3. height = int(input())
  4. width = int(input())
  5. percent = int(input())
  6.  
  7. total_area = height * width * 4
  8. painted_area = total_area * (100 - percent) / 100
  9. area = ceil(painted_area)
  10.  
  11. while True:
  12.     liter = input()
  13.     if liter == 'Tired!':
  14.         print(f'{area} quadratic m left.')
  15.         break
  16.     area -= int(liter)
  17.     if area == 0:
  18.         print('All walls are painted! Great job, Pesho!')
  19.         break
  20.     elif area < 0:
  21.         print(f'All walls are painted and you have {-area} l paint left!')
  22.         break
  23.  
  24. # 100/100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement