Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- wall_height = int(input())
- wall_width = int(input())
- pct_not_paintable = int(input())
- total_area = 4 * wall_width * wall_height
- paintable_total_area = math.ceil(total_area - (total_area * pct_not_paintable / 100))
- command = input()
- while command != "Tired!":
- liters_paint = int(command)
- paintable_total_area -= liters_paint
- if paintable_total_area <= 0:
- if paintable_total_area < 0:
- print(f'All walls are painted and you have {abs(paintable_total_area)} l paint left!')
- elif paintable_total_area == 0:
- print("All walls are painted! Great job, Pesho!")
- break
- command = input()
- else:
- print(f'{paintable_total_area} quadratic m left.')
Advertisement
Add Comment
Please, Sign In to add comment