17 lines
317 B
Python
17 lines
317 B
Python
#最小公倍数
|
|
a = int(input())
|
|
b = int(input())
|
|
|
|
def _gcd(x,y): #最大公约数
|
|
if x>y:
|
|
x,y=y,x
|
|
for i in range(x,0,-1):
|
|
if x%i==0 and y%i==0:
|
|
return i
|
|
|
|
def lcm(x,y): #最小公倍数
|
|
a = int((x*y)/_gcd(x,y))
|
|
return a
|
|
|
|
print(lcm(a,b))
|