project-euler/0003.py

13 lines
195 B
Python

from functools import reduce
import util
target = 600851475143
factors = util.find_prime_factors(target)
result = reduce((lambda x, y: x * y), factors)
print(result)
print(result == target)