Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import math
- h = int(input())
- w = int(input())
- no_painting_rate = 1 - int(input()) / 100
- area = 4 * h * w
- area_to_paint = area * no_painting_rate
- area_covered = 0
- total_paint = 0
- paint = 0
- paint = input()
- while not paint == "Tired!":
- paint = int(paint)
- area_covered += paint
- if area_covered >= area_to_paint:
- break
- paint = input()
- difference = math.ceil(abs(area_covered - area_to_paint))
- if paint == "Tired!":
- print(f"{difference} quadratic m left.")
- elif area_covered > area_to_paint:
- print(f"All walls are painted and you have {difference} l paint left!")
- else:
- print(f'All walls are painted! Great job, Pesho!')
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement