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