Can you help me identify the mistake in my code

Two test cases are failing because of runtime error

Hello @anushreemahur5,

The value of n can be upto 5000000.

Mistake:
Is finding prime upto 1000000 is enough?

Solution:
Rather finding prime numbers upto 100000007.

Hope, this would help.
Give a like if you are satisfied.

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.