题解 | #求最小公倍数#
求最小公倍数
https://www.nowcoder.com/practice/22948c2cad484e0291350abad86136c3
text = list(map(int, input().strip().split(' ')))
n1 = text[0]
n2 = text[1]
common = 1
for i in range(1, min(n1,n2)+1):
if n1%i == 0 and n2%i == 0:
common = i
print(n1*n2//common)
查看8道真题和解析
