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.
So from this we'd know 2,3,5, and 7 are primes and so on up to the size of the sieve. Since your sieve was 10001 in length you would know all the primes numbers <= 10001, but not the first 10001 primes.
The 10001th prime is greater than 10001 but less than 200000.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Project Euler #7: 10001st prime
You are viewing a single comment's thread. Return to all comments →
A sieve typically is just a masking array that tells you if something is prime at a given index
So from this we'd know 2,3,5, and 7 are primes and so on up to the size of the sieve. Since your sieve was 10001 in length you would know all the primes numbers <= 10001, but not the first 10001 primes.
The 10001th prime is greater than 10001 but less than 200000.