Why my code is not showing output for some cases

My code is not working for some test cases

@Ramitgoel Please save your code on ide.codingblocks.com and share its link.

@pratyush63

@pratyush63??
Please reply to my doubt

@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

i increased it but then it is showing error
@pratyush63

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