We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
Spent a lot of time on this problem, and got 100.00 without much satisfaction. I could be wrong, but I cannot see how using Miller-Rabin is significantly better than a simple is_prime(n) function when you have all the primes up to sqrt(n) already available after a prime sieve.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #50: Consecutive prime sum
You are viewing a single comment's thread. Return to all comments →
Spent a lot of time on this problem, and got 100.00 without much satisfaction. I could be wrong, but I cannot see how using Miller-Rabin is significantly better than a simple
is_prime(n)
function when you have all the primes up tosqrt(n)
already available after a prime sieve.