i am not able to calculate the sieve for such a large number as array size is very large and no array can be constructed
Array size deubfuef
Create a sieve array of size 100000005.
i have taken the size 100000005.but my code is showing compilation error.what is the mistake in the code
Okay send the link to your code please
hi @mayank10 the constaints say n can be upto 5000000. 5,000,000th prime number is 7,368,787 so you can easily construct an array of the needed size. If you need any further help please save your code on ide.codingblocks.com and share the link.