Ограничения: время – 250ms/500ms, память – 256MiB Ввод: input.txt или стандартный ввод Вывод: output.txt или стандартный вывод
Послать решение Blockly Посылки Темы Где Обсудить (0)
Basic Cast reduces enemy health by 1, while Diffindo take away the smallest prime factor of current enemy health.
Determine the minimum length of a sequence of spells after which the enemy's health will become 0.
The first line contains a single integer `N` (`1 <= N < 10^9`) -- the enemy's health.
Output the the minimum length of spell combo.
```sample Sample Input 1
5
```
```sample Sample Output 1
1
```
```sample Sample Input 2
10
```
```sample Sample Output 2
3
```
Use Diffindo (10-2=8), Basic Cast (8-1=7), and Diffindo again (7-7=0).