Sichanov

ss

Nov 24th, 2021
965
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.49 KB | None | 0 0
  1. from math import ceil
  2.  
  3. height = int(input())
  4. width = int(input())
  5.  
  6. total_area = height * width * 4
  7.  
  8. for i in range(1, 101):
  9.  
  10.     painted_area_100 = total_area * (100 - i) / 100
  11.     painted_area_1 = total_area * (1 - i / 100)
  12.     area_100 = ceil(painted_area_100)
  13.     area_1 = ceil(painted_area_1)
  14.     if area_100 == area_1:
  15.         print(f'(100 - i) / 100 = {area_100}; (1 - i / 100) = {area_1}')
  16.     else:
  17.         print(f'NO : (100 - i) / 100 = {area_100}; (1 - i / 100) = {area_1}')
  18.  
Advertisement
Add Comment
Please, Sign In to add comment