How i remove tle

How I remove TLE from the code.
question link:- https://hack.codingblocks.com/app/practice/3/1039/problem
my code:- https://ide.codingblocks.com/s/200395

Hello @sonu28sharma99,

You need to use an optimize approach to compute all the prime numbers within a range.
Solution:
sieve of eratosthenes

Refer to this link for the detailed explanation of the approach.

In case you still face any issue, refer to the following code:

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.