Issue in Prime Generator Question

I am facing an issue where I am getting the following error in the Prime generator question,

runguard: warning: timelimit exceeded (wall time): aborting command runguard: warning: command terminated with signal 15

But the input which I give gives the correct answer. What’s the issue?

The issue is that the code you have written is not optimized enough and It takes too long to get the result, to avoid this error try writing a faster more efficient code for the given problem, try reducing its time complexity

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.