python求最大公约数和最小公倍数
摘要:1 def gcd(x,y): 2 while(y): 3 t=x%y 4 x=y 5 y=t 6 #print("最小公倍数是:",x*y/x)#最小公倍数是两数之积除以最大公约数 7 return x
阅读全文
posted @ 2020-10-28 16:38
posted @ 2020-10-28 16:38
posted @ 2020-10-27 15:14
posted @ 2020-10-26 14:01