号码是11288798737163099824081460333619591342348211143669600740142907237723834164788215269828199986523
def getfactors(number):
factors = []
for potentialFactor in range(1 , int(math.sqrt(number)) + 1):
if number % potentialFactor == 0:
factors.append(potentialFactor)
return factors
Run Code Online (Sandbox Code Playgroud)
输入是
getfactors(112887987371630998240814603336195913423482111436696007401429072377238341647882152698281999652360869)
Run Code Online (Sandbox Code Playgroud)
The program has been running for at least 3 hours and I still have no results from it yet. The code works with other numbers too. Is there any algorithm or method that I could use to speed this up?