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.
You can reduce the size of sieve.By observation,I got that sum of first 126000 primes exceeds 10^12 and for that we need a sieve for 1700000(not exactly).
I think this will help.
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 →
You can reduce the size of sieve.By observation,I got that sum of first 126000 primes exceeds 10^12 and for that we need a sieve for 1700000(not exactly). I think this will help.