### DWITE Online Computer Programming Contest

February 2006

### Problem 5

## Prime Palindromes

The number 181 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, L and U, the range of numbers to determine the prime palindromes. 2 ≤ L ≤ U ≤ 999,999.

The output will contain the number of prime palindromes between L and U, inclusive.

### Sample Input (3 sets of data only)

2 10 100 200 10000 20000

### Sample Output

4 5 26

All Submissions

Best Solutions

**Point Value:** 10

**Time Limit:** 1.00s

**Memory Limit:** 16M

**Added:** Nov 13, 2008

**Languages Allowed:**

C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

## Comments (Search)

paulkron Oct 17, 2014 - 3:38:59 am UTC 0/100thorthugnastyon Oct 17, 2014 - 3:54:10 am UTC Re: 0/100paulkron Oct 17, 2014 - 12:00:44 pm UTC Re: 0/100