ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Разделы > Арифметика > задача:


51003 - Double Prime

Гость
• Вопросы к жюри (2)

Задачи раздела

• 50413 - Valid Permutations
• 50481 - Car Parking
• 50417 - Fun Fair
• 50530 - Sum of Ratios
• 50384 - Permutations revisited
• 50368 - Right-most non zero digit in N!
• 50369 - Base Conversion
• 50407 - Missing Number
• 51003 - Double Prime
• 50807 - Euro to Leke
• 50433 - Sum of Cubes
• 50871 - Harmonic Mean
• 50521 - Pound to Grams
• 50432 - Numbers and Squares
• 50510 - What floor are they?
• 50870 - ZScore normalization
• 50797 - Nr of Missing Guests

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
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.



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

www.contester.ru