Deepak and primes

which test cases are failing?

if you want to check testcase
you can open them but after that no point will be given to you

here i am telling you the mistake you have done

i am considering the submission

5982331 50 16 May 2020 01:14:48

when you got 50 score

you are running loop till 100000 but according to constraints n can be
and prime willl be less than 7400000
so make size of array to 7400001 at least

also change type of arrray a from int to bool

use long long int instead of int

these are modification to get correct answer

Modified Code

if you have more doubts regarding this feel free to ask
i hope this helps
if yes hit a like :heart:: and don’t forgot to mark doubt as resolved :grinning:

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.