A palindromic prime (sometimes called a palprime) is a prime number that is also a palindromic number.
Given a number n, output the count of numbers less than or equal to n which are palindromic prime.
The first line of input contains an integer T denoting the number of test cases. Then T test cases follow. The first line of each test case contains the integer N.
Print the count of numbers less than or equal to n which are palindromic prime. Print the answer for each test case in a new line.
1<= T <=100
1<= N <=1000000
If you have purchased any course from GeeksforGeeks then please ask your doubt on course discussion forum. You will get quick replies from GFG Moderators there.