Find the nth prime number

get some test cases failed , why?

hello @souravraj024
please share the question name

Deepak and primes (Number theory)

image

value of n can be upto 5000 000 so u need to build sieve upto 5000 000th prime number.

check value of 5000 000th prime number from internet and make changes accordingly.

refer this -> https://ide.codingblocks.com/s/235121

when i use 5000000 then it show segmentation fault , what’s wrong in my code ?

pls share ur updated code ,i will check

cb ide might have less memory resources may be thats why it is showing segementation fault.

btw u need to run ur sieve upto 5000 000 th prime number ( 5000 000 and 5000 000 th prime number are different things).
check code i have shared above.

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.