Problem 3 - Largest prime factor
摘要:
The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?求600851475143的最大素数因子。Python 1 factors = [] 2 maximum = 600851475143 3 def getFactor(x): 4 y = x / 2 5 i = 2 6 while True: 7 if i > y: 8 break 9 if x %... 阅读全文
posted @ 2013-01-06 08:47 luchigster 阅读(128) 评论(0) 推荐(0) 编辑