HomeVolumesContestsSectionsForumsUsersPrintHelpAbout

Contests > "Informatics Stars" Online Contests - 2011-2014 > problem:


2011-04-1. 50586 - Prime Palindromes

"Informatics Stars" Online Contests - 2011-2014

Start: Oct.20.2012 at 10:00:00 AM
Finish: Oct.20.2012 at 03:00:00 PM
The contest is finished!
• Contest scoreboard

Guest
• Review clarifications (2)

Contest problems

• 50326 - Matrix Operations
• 50325 - How much time passed?
• 50776 - The number of different pa...
• 50779 - The shortest path in a maze
• 2011-04-1. 50586 - Prime Palind...
• 2011-04-2. 50585 - Inner Product
• 2011-04-3. 50587 - Modular Convers...
• 2011-05-1. 50767 - Censor
• 2011-05-2. 50652 - Prime Factorization
• 2011-05-3. 50653 - Long Divide
• 2011-11-1. 50565 - Binary numbers
• 2011-11-3. 50588 - Processing the li...
• 2012-02-2. 50577 - Perfect Numbers...

Feedback

If you notice incorrect translations in Contester, please let author know.

Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb.
Prepared by Ibrahim Mesecan.

Prime Palindromes

Shqip
A prime number is a natural number that has exactly two distinct natural number divisors: 1 and itself.
A palindromic number is a 'symmetrical' number like 16461, that remains the same when its digits are reversed.
A number is prime palindrome if it's at the same time prime and palindromic number. Write a program that finds the number of prime palindromic numbers between two given numbers: m and n.
For example: If m and n are given : 10000 12000 Then the prime palindromic numbers are: 10301 10501 10601 11311 11411.

Input specification
There will be two numbers in the input file which are between 1 ≤ n < m ≤ 100000.

Output specification
Find the number of prime palindromic numbers between the given numbers. If there is no prime palindromic number within the given range show 0 (zero).

Input
10000 12000
Output
5

Для отправки решений необходимо выполнить вход.

www.contester.ru