ProjectEuler/problem3.py
2019-12-29 03:12:56 +01:00

16 lines
233 B
Python

import math
n = 600851475143
def pf(n):
factors = []
for i in range(2, n):
if n / i == n // i:
n //= i
factors.append(i)
if n == 1:
break
return factors
print(pf(n))