CSES - Trailing Zeros | Số không ở cuối

View as PDF



Authors:
Problem types
Points: 1000 (p) Time limit: 1.0s Memory limit: 512M Input: stdin Output: stdout

Nhiệm vụ của bạn là đếm số lượng chữ số \(0\) ở cuối trong \(n\)\(!\).

Ví dụ: \(20! = 2432902008176640000\) và nó có \(4\) chữ số không ở cuối

Input

  • Chỉ một dòng duy nhất chứa một số nguyên \(n\).

Output

  • In ra số lượng chữ số không ở cuối của \(n!\).

Constraints

  • \(1 \leq n \leq 10^9\)

Example

Sample input

20

Sample output

4

Comments (15)

Most recent
Loading comments...