DWITE Online Computer Programming Contest, February 2006, Problem 5
The number is a prime palindrome because it is both a prime number and a palindrome. A palindrome is a number that is the same when read forward as backward. Write a program that determines how many prime palindromes there are between two numbers.
The input will contain five sets of data. Each set will contain two integers, and , the range of numbers to determine the prime palindromes. .
The output will contain the number of prime palindromes between and , inclusive.
Sample Input (3 sets of data only)
2 10
100 200
10000 20000
Sample Output
4
5
26
Comments