Prime Palindromes TLE

exceeded
limit
time

#1

http://www.codechef.com/viewsolution/5130785

this is link to my code. It shows TLE error. can anyone plz help me !


#2

I would recommend finding primes palindromes by using Seive and then Binary Search would do.

Link to solution.