Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from math import ceil
- height = int(input())
- width = int(input())
- percent = int(input())
- total_area = height * width * 4
- painted_area = total_area * (100 - percent) / 100
- area = ceil(painted_area)
- while True:
- liter = input()
- if liter == 'Tired!':
- print(f'{area} quadratic m left.')
- break
- area -= int(liter)
- if area == 0:
- print('All walls are painted! Great job, Pesho!')
- break
- elif area < 0:
- print(f'All walls are painted and you have {-area} l paint left!')
- break
- # 100/100
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement