how to deal with the segmentation fault in this question?
Deepak and prime
hello @nirupama1
a) check value of 5000 000 th prime number and declare ur sieve size bigger than that.
b) then compute sieve upto that value.
i have to check the 5000000 th prime number manually? please update the code also.
to determine the size of sieve we need to know 5000 000 th prime number , so check value of 5000 000th prime number from internet and rest logic is same as ur code.
the issue is only in the size of sieve.
but we can not do this in contests and also we cannot remember those values.
check ur code -> https://ide.codingblocks.com/s/228906
just changed value of N.
no need to remember anything. most of the contests allows internet access.
if they restrict then they will provide u complete data required to solve such problem.
The code is still giving segmentation fault.
it is working pls try again