I dont know according to the optimisations which have been taught by Prateek bhaiya, still the code is not gettiing submitt and shows the error as TIME LIMIT(5.96 sec) . many times when I am getting the segmentation fault when i m putting N> 10^6… kindly tell already wasted lots of time …https://ide.codingblocks.com/s/157465
Prateek loves candy
hey @Madhavendra-Gupta-2240591552663161, check the constraints of the question they are very high, change int to long long int everywhere and make a prime sieve atleast of 10^6,
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.