Problem 3

This commit is contained in:
Dece 2019-12-29 03:08:53 +01:00
parent 5b51f10563
commit ca1232e0ef

15
problem3.py Normal file
View file

@ -0,0 +1,15 @@
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))