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

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


51003 - Double Prime

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

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

• 50432 - Numbers and Squares
• 50510 - What floor are they?
• 50870 - ZScore normalization
• 50797 - Nr of Missing Guests
• 50518 - Histogram Equalization
• 50522 - Multiplication Table - 2
• 50814 - Buying Books from Internet
• 50812 - Total Discount for the clients
• 51003 - Double Prime
• 50435 - City Electric Bills
• 50527 - Sum of LCMs
• 50440 - Call Center
• 50342 - 100 Factorial
• 50439 - Telephone Calls
• 50436 - Pocket Money
• 50379 - a^b modulus k
• 50353 - Cube of the Largest number

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

Если у вас есть предложения или пожелания по работе 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