Why TLE in this program?

I have used the sieve of eratosthenes algorithm