code : https://ide.codingblocks.com/s/206407
code is correct… but there is some issue in constraints
code : https://ide.codingblocks.com/s/206407
code is correct… but there is some issue in constraints
make the array and iteration in for loop uptil
100000005
thanks it worked…
but why this particular value 100000005
constraint given is 1<=n<=5000000
5,000,000 th prime number is 86,028,121. Thus you need to set the size of “p” (in your code) to a number greater than 86,028,121.
we need to find the nth prime no and n being large we take 100000005 as array size
okay thanks i got it