Why is this code not working?

@aryangrover
hello aryan,
the issue is with ur sieve size. size should be bigger than 5000000th primr numbr.
so first find 5000000th prime number and declare ur size accordingly

Sir I don’t understand about this.


Is this correct

@aryangrover
it is correct but will work only for prime numbers that are less than or equal to 5000000
but In question u need to answer for upto 5000000th prime number that why u need to increase ur sieve size,

5000000 and 5000000th prime number are different things

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.