Time limit 2000/4000/4000/4000 ms. Memory limit 65000/65000/65000/65000 Kb. Question by Ibrahim Mesecan.
Double Prime
A number is prime if it is divisible only by one
and itself. A number is Double Prime if the number itself
and its digits are prime numbers.
Question:
Write a program that counts double prime
numbers within the given range.
Input specification
You will be given two numbers: x and y which are
between 1 and 40,000,000.
Output specification:
Show the number of double primes within the
given range. If there is no double prime number,
then show 0 (zero).
Sample Input I
15 30
|
Sample Output I
1
|
Explanation:
There are four prime numbers between 15 and 30: 17, 19, 23, and 29.
But only one of them is double prime: 23.
Для отправки решений необходимо выполнить вход.
|