Why my sieve is not built upto 5000000 places
still i am getting the output
try cout<<p[5000000];
btw value of n=5000 000 means u need to compute ur sieve upto 5000 000 th prime.
so declare ur sieve size more than 5000 000 th prime number.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
@navin i think using bitset of this much size is not suitable for this problem,
look at this i have updated your code a little