My code is not working for some test cases
Why my code is not showing output for some cases
@Ramitgoel You are giving 5000 as a parameter to function primesieve in line 32. Increase that as you can see that the constraints are large.
1<=n<=5000000
Since constraints are large, change the data types to long long int and then check.
You may refer this code.
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.
1 Like