Manthan, Codefest 16
B
A Trivial Problem
Codeforces
1300
原题
← AC →
翻译中…

Mr. Santa asks all the great programmers of the world to solve a trivial problem. He gives them an integer $*m*$ and asks for the number of positive integers $*n*$, such that the factorial of $*n*$ ends with exactly $*m*$ zeroes. Are you among those great programmers who can solve this problem?

翻译中…

Input

翻译中…

The only line of input contains an integer $*m*$ ($1 ≤ *m* ≤ 100 000$) — the required number of trailing zeroes in factorial.

翻译中…

Output

翻译中…

First print $*k*$ — the number of values of $*n*$ such that the factorial of $*n*$ ends with $*m*$ zeroes. Then print these $*k*$ integers in increasing order.

翻译中…

Note

翻译中…

The factorial of $*n*$ is equal to the product of all integers from $1$ to $*n*$ inclusive, that is $*n*! = 1·2·3·...·*n*$.

翻译中…

In the first sample, $5! = 120$, $6! = 720$, $7! = 5040$, $8! = 40320$ and $9! = 362880$.

翻译中…

样例

Input #1
1
Output #1
5
5 6 7 8 9
InputCopy OutputCopy
Input #2
5
Output #2
0
InputCopy OutputCopy
题目信息
题号
633B
时间限制
2 s
内存限制
256 MB
标签
暴力
构造
数学
数论

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。