No.537 User ID
Problem Statement
treeone has decided to make every one of his user IDs follow the format "name + some number $X$ ".
The number $X$ appended to the end of the user ID is determined by the following procedure.
First, choose an arbitrary positive integer $N$, $1$ in number.
Next, enumerate the pairs of $2$ positive integers whose product is $N$.
Finally, the candidates for $X$ are the results of concatenating, as strings, the $2$ numbers of each pair enumerated above.
For example, when $N = 6$, there are $2$ pairs of $2$ numbers whose product is $6$, namely $(1, 6), (2, 3) $,
so there are $4$ candidates for $X$: $16, 61, 23, 32$.
Given $N$, find how many candidates for $X$ there are.
Input
$N$
$ 1 \leqq N \leqq 10^{12}$
$N$ is an integer.
Output
Output the number of candidates for $X$. Print a newline at the end.
Sample
Sample 1
Input
6
Output
4
This is the example given in the problem statement.
Sample 2
Input
63
Output
6
The pairs of $2$ positive integers whose product is $63$ are $(1, 63), (3, 21), (9, 7)$, so there are $6$ candidates for $X$: $163, 631, 321, 213, 97, 79$.
Sample 3
Input
49
Output
3
There are $3$ candidates for $X$: $149, 491, 77$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
treeone
はむこ