ProjectEuler/problem3.py

16 lines
233 B
Python
Raw Normal View History

2019-12-29 03:08:53 +01:00
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))