题解 | #求最小公倍数#
求最小公倍数
https://www.nowcoder.com/practice/22948c2cad484e0291350abad86136c3
while True: try: m,n=map(int,input().split()) a=m b=n while b>0: a,b=b,a%b print(m*n//a) except: break
求最小公倍数
https://www.nowcoder.com/practice/22948c2cad484e0291350abad86136c3
while True: try: m,n=map(int,input().split()) a=m b=n while b>0: a,b=b,a%b print(m*n//a) except: break
相关推荐