All the test cases passed except TESTCASE 3 ,please tell whats wrong in the code.
Deepak and Primes
Hello @ujj1804_1156aee80205d0bf,
500000th prime = 7,368,787 but your size max limit is 500005;
So, increase the limit of the size variable and also make the array global.
const long size=10000005;
long arr[size]={0};
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.