Problem 3
This commit is contained in:
parent
5b51f10563
commit
ca1232e0ef
15
problem3.py
Normal file
15
problem3.py
Normal 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))
|
Loading…
Reference in a new issue