Only one test case is not running. Please check
Deepak and primes
You have to print nth prime no. where n<=500000
and in your current code you are only checking primes till 500000.
So change accordingly and declare this globally long long int a[10000005];
because in function you can’t allot that much space.
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.