the-honk/euler/_pythonarchive/3 - Largest prime factor.py
2021-10-29 01:00:43 +01:00

10 lines
90 B
Python

n = 600851475143
i = 2
while i * i <= n:
if n % i:
i += 1
else:
n //= i
print(n)