For example, the number is 3000000021 whose prime factors are 3 and 1000000007.
In a traditional way, e.g.
n=int(raw_input())
d=2
factors=[]
while n!=1:
if n%d==0:
factors.append(d)
n/=d
else:
d+=1
print factors
It takes forever to analyze such number.
Pollard's Rho algorithm seems to be a good solution in this case, but it can't get all of them. Is there any faster way to solve this problem?