题解 | #求最小公倍数#笨办法
求最小公倍数
https://www.nowcoder.com/practice/22948c2cad484e0291350abad86136c3
#蠢办法,测试用例太大的话会超时 #a,b=map(int,input().split(' ')) #gb=a*b #if a>b: # min=b #else: # min=a #for i in range(min,a*b+1): # if (i%a == 0) and (i%b == 0) and (i<gb): # gb=i #print(gb) #笨办法 a,b=map(int,input().split(' ')) if a>b: min=b max=a else: min=a max=b star=max//min while (min*star)%max != 0: star=star+1 print(min*star)