My 3 test cases are showing run error

@Deepanshu_garg
It is mentioned that n can be as large as 5000000 in the problem constraints. Hence we might even be asked to print the 5000000th prime number which is a little over 86 million. So you need to increase the size of your sieve array.
I would suggest you to increase it to 87 million as it is better to be safe by having a little extra array size.

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.