vrijdag 18 februari 2011

Euler problem 03

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


What is the largest prime factor of the number 600851475143 ?


Solution:
In this solution the Sieve of Eratosthenes is used to compute Prime numbers.
In one of the next problems i will consider the sieve of Atkin. This is a fast, modern algorithm for finding all prime numbers up to a specified integer. It is an optimized version of the ancient sieve of Eratosthenes









Problem03 =        6857 elapsed time:   56 ms. Test Passed.

Geen opmerkingen:

Een reactie posten