fork(1) download
  1. # your code goes here
  2. x=input()
  3. y=input()
  4. m1=x
  5. m2=y
  6. while m1!=m2:
  7. if m1<m2:
  8. m1=m1+x
  9. else:
  10. m2=m2+y
  11. print m1
Success #stdin #stdout 0s 23304KB
stdin
6
10
stdout
30