题解 | #求最小公倍数#
求最小公倍数
https://www.nowcoder.com/practice/22948c2cad484e0291350abad86136c3
l = list(map(int, input().strip().split()))
a, b = max(l), min(l)
while b > 0:
temp = a % b
a = b
b = temp
print(l[0] * l[1] // a)
求最小公倍数
https://www.nowcoder.com/practice/22948c2cad484e0291350abad86136c3
l = list(map(int, input().strip().split()))
a, b = max(l), min(l)
while b > 0:
temp = a % b
a = b
b = temp
print(l[0] * l[1] // a)
相关推荐