Trailing zeros - MarisaOJ: Marisa Online Judge

Trailing zeros

Time limit: 1000 ms
Memory limit: 256 MB
Count the number of trailing zeros in $n!$. Note: $n! = 1 \times 2 \times ... \times n$. ### Input - The first line contains an integer $n$. ### Output - A single integer is the number of traling zeros in $n!$. ### Constraints - $1 \le n \le 1000$. ### Example Input: ``` 10 ``` Output: ``` 2 ```