Ограничения: время – 250ms/500ms, память – 256MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод
Послать решение Blockly Посылки Темы Где Обсудить (0)
Given a number `N`.
You have to replace the least amount of digits in the number to get a prime number.
The first line contains a single integer `N` (`1 <= N < 10^9`).
Output the prime number obtained after replacing the digits.
If there are multiple solutions with the same number of digit replacements, print the smallest prime number of them.
```sample Sample Input 1
5
```
```sample Sample Output 1
5
```
```sample Sample Input 2
93
```
```sample Sample Output 2
13
```