Deepak and primes tle

kindly tell where i am doing wrong…

There was a slight error in your code, firstly u need to use long long int everywhere, instead of using only int since constraints are large,
also no need to initialize long long int p[n] = {0};
c should be intialized to 1, as it will be used for nth prime,

I have corrected your code a bit, try to submit it now

1 Like

@yuktimutreja01 Thanks a lot for ur help :slight_smile: