Partial Correct for May LunchTime : NUMCOMP1

Approach : Precomputation as discussed in editorial
→ nPrime[ i ] stores the count of primes till i (inclusive)

Here is the link :
https://www.codechef.com/viewsolution/47345495

Apart from helping with the logic, u can also suggest me how to improve code quality, or a shorter/smarter way to do any task.

Do every index of nPrime array has some value?

Thanks a lot. I missed that it is filled only till sqrt(N)