here it is https://ide.codingblocks.com/s/245863
Could u check my code it is giving segmentation fault
@sshreya2912
There is mistake in creating sieve
- use long long int everywhere is primeSieve() function
- why have you passed p array in primeSieve() function. Your p array stores input and is of size n. create another array say ll pn[1000006] and then pass it to function.
Here is your updated code: https://ide.codingblocks.com/s/245909