Getting time limit in this question

My code ide is https://ide.codingblocks.com/s/115063
for finding the T primes please check

same thing bro, you are using brute force here , but if you think there is a trick in the question , T primes are those numbers which are square of a prime number. use this