上帝大脸 发表于 2017-5-5 07:25:40

python 最大公约数

def gcd(a,b):
if b==0:
return a
else:
return gcd(b,a%b)
print gcd(50,10)
页: [1]
查看完整版本: python 最大公约数