Programming contests

ECN selejtező programozó csapatverseny, 2017. április 12.

April 12, 2017 10:00 AM – April 12, 2017 3:00 PM

Trailing Zeros

Given a number, find the number of trailing zeros in its factorial.

Input Specification

A single integer N (1 ≤ N ≤ 1000).

Output Specification

Print a single integer, the number of trailing zeros.

Sample Input

  1. 10
download as text file

Output for Sample Input

  1. 2
download as text file

Sample Explanation

10! = 3 628 800 has 2 zeros at the end.

University of Debrecen; Faculty of Informatics; v. 03/01/2019