Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.19 KB | None | 0 0
  1. x = int(input())
  2. c = int(input())
  3. a, b = x, c
  4. g = 2
  5. if a == b:
  6.     print('1')
  7. else:
  8.     while a != b:
  9.         a, b = x, c
  10.         a, b = a * g, b * g
  11.         g += 1
  12.     print(g)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement