Python题解 | #求最小公倍数#
求最小公倍数
https://www.nowcoder.com/practice/22948c2cad484e0291350abad86136c3
from math import gcd
def func(a, b):
if a < b:
a, b = b, a
if b % a == 0:
return b
else:
return (a * b) / gcd(a, b)
while True:
try:
x, y = map(int, input().split(' '))
print(int(func(x, y)))
except:
break