Advertisement
exDotaPro

2019_6_july_4_renovation

Feb 1st, 2020
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.58 KB | None | 0 0
  1. from math import ceil
  2.  
  3. wall_height = int(input())
  4. wall_width = int(input())
  5. percentage = int(input())
  6.  
  7. walls = wall_height * wall_width * 4
  8. walls = int(ceil(walls - (walls / 100 * percentage)))
  9.  
  10. command = input()
  11.  
  12. while command != 'Tired!':
  13.     liters_paint = int(command)
  14.  
  15.     walls -= liters_paint
  16.  
  17.     if walls <= 0:
  18.         break
  19.  
  20.     command = input()
  21.  
  22. if walls > 0:
  23.     print(f'{walls} quadratic m left.')
  24. elif walls == 0:
  25.     print('All walls are painted! Great job, Pesho!')
  26. else:
  27.     print(f'All walls are painted and you have {abs(walls)} l paint left!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement