方法一:辗转相除法
a,b = map(int,input().split())
c,d = a,b
if a>b:
a,b = b,a
r = a%b
while r !=0:
a,b = b,r
r = a%b
print(c*d//b)
方法二:自定义函数法
a,b=map(int,input().split())
def get(a,b):
if a%b==0:
return b
else:
return get(b,a%b)
print(a*b//get(a,b))
方法三:调用库函数法
from math import *
n, m = map(int, input().split())
print(int(n * m / gcd(n, m)))