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

Турниры > Bil-176_Praktika_6_23042019 > задача:


2. Strong Prime Power

Bil-176_Praktika_6_23042019

Старт: 23.апр.2019 в 21:05:00
Финиш: 26.апр.2019 в 08:55:00
Турнир завершён!
• Турнирная таблица

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

Задачи турнира

• 1. Степень
• 2. Strong Prime Power
• 4. Матрица
• 5. Скобки

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

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

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.

A number which can be represented as pq, where p is a prime number and q is an integer greater than 0, is called a prime power. If q is larger than 1, we call the number a strong prime power. You are given an integer n. If n is a strong prime power, find p and q for it.

Input
The single line contains one integer n (2 ≤ n ≤ 1018). n will contain digits only ('0'-'9') without any leading zeros.
Output
If n is a strong prime power, output p and q in the single line separated by one space. If n is not a strong prime power, output 0 instead.

Input 1 Input 2 Input 3 Input 4
27
10
7
576460752303423488
Output 1 Output 2 Output 3 Output 4
3 3
0
0
2 59

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

www.contester.ru