Advertisement
serega1112

kvadraty

Jan 12th, 2021
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.13 KB | None | 0 0
  1. a, b = map(int, input().split())
  2.  
  3. res = 0
  4.  
  5. while a % b > 0:
  6.     res += a // b
  7.     a, b = b, a % b
  8.  
  9. res += a // b
  10.  
  11. print(res)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement