标签:int put pytho and 公约数 nbsp append bsp app
a=int(raw_input(‘a‘))
b=int(raw_input(‘b‘))
su=[]
if a>b:
smaller=b
else:
smaller=a
for i in range(1,smaller+1):
if a%i==0 and b%i==0:
su.append(i)
l=len(su)
p=su[l-1]
print ‘最大公约数:‘,p
print ‘最小公倍数:‘,a*b/p
标签:int put pytho and 公约数 nbsp append bsp app
原文地址:http://www.cnblogs.com/jietingting/p/7076954.html