AtCoder Beginner Contest 148
翻译中…
Problem Statement
翻译中…
For an integer $n$ not less than $0$, let us define $f(n)$ as follows:
翻译中…
$f(n) = 1$(if$n < 2$)$f(n) = n f(n-2)$(if$n \geq 2$)
翻译中…
Given is an integer $N$. Find the number of trailing zeros in the decimal notation of $f(N)$.
翻译中…
Constraints
翻译中…
$0 \leq N \leq 10^{18}$
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
Print the number of trailing zeros in the decimal notation of $f(N)$.
翻译中…
样例
Input #1
12
Output #1
1
$f(12) = 12 × 10 × 8 × 6 × 4 × 2 = 46080$, which has one trailing zero.
Input #2
5
Output #2
0
$f(5) = 5 × 3 × 1 = 15$, which has no trailing zeros.
Input #3
1000000000000000000
Output #3
124999999999999995
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。