Py学习  »  Python

如何解决Python中大数问题的函数?

Simurg1866 • 3 年前 • 1210 次点击  

我想找出600851475143的因素。我的代码坏了。

def factor(a):
factor = []
for i in range (1, a+1):
    if(a%i==0):
        factor.append(i)

print(factor)
factor.clear()

系数(600851475143)

Python社区是高质量的Python/Django开发社区
本文地址:http://www.python88.com/topic/132393
 
1210 次点击  
文章 [ 4 ]  |  最新文章 3 年前