Largest prime factor in Python

This is the problem number four in the Project Euler which reads:

The prime factors of 13195 are 5, 7, 13 and 29.

What is the largest prime factor of the number 600851475143 ?

My own solution to resolve this problem is the following:

And the correct answer to this problem is: 6857

Tagged with: , , ,

Leave a Reply

Your email address will not be published. Required fields are marked *


This site uses Akismet to reduce spam. Learn how your comment data is processed.