New life from now
02 July, 2010
算法之美:求一个数n的最大质因数(Python)
n=600851475143
d=2
while d < n/d:
if n%d==0:
n/=d
else:
d+=1
print n
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)