Please help me with the code . Two test cases are not running.
Deepak and Primes
@2018kucp1041 you have to calculate 5000000th prime number that is around 10^8 and you are just checking prime numers upto 10^6 so for bigger values of n your code will give you wrong ans.calculate primes upto 10^8 and store them in your array p.
thanks for helping.Problem solved.