100 atcoder#ABC169D. [ABC169D] Div Game
[ABC169D] Div Game
Score : points
Problem Statement
Given is a positive integer . Consider repeatedly applying the operation below on :
- First, choose a positive integer satisfying all of the conditions below:- can be represented as , where is a prime number and is a positive integer;
- divides ;
- is different from all integers chosen in previous operations.
- Then, replace with .
Find the maximum number of times the operation can be applied.
Constraints
- All values in input are integers.
Input
Input is given from Standard Input in the following format:
Output
Print the maximum number of times the operation can be applied.
24
3
We can apply the operation three times by, for example, making the following choices:
- Choose . (Now we have .)
- Choose . (Now we have .)
- Choose . (Now we have .)
1
0
We cannot apply the operation at all.
64
3
We can apply the operation three times by, for example, making the following choices:
- Choose . (Now we have .)
- Choose . (Now we have .)
- Choose . (Now we have .)
1000000007
1
We can apply the operation once by, for example, making the following choice:
- . (Now we have .)
997764507000
7