0


HJ108:求最小公倍数 python

def gcd(a,b):
if a<b:
smaller=a
else:
smaller=b
for i in range(smaller,0,-1):
if a%i==0 and b%i==0:
return smaller
else:
smaller-=1
def lcm1(a,b):
g=gcd(a,b)
return a*b/g

跑不出结果,求指教哪里出问题

标签: p2p linq c#

本文转载自: https://blog.csdn.net/m0_66389477/article/details/122680957
版权归原作者 m0_66389477 所有, 如有侵权,请联系我们删除。

“HJ108:求最小公倍数 python”的评论:

还没有评论