ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Алгоритмы и Структуры Данных > задача:


05. Trailing Zeros

Задачи сборника

• 40. Traffic Lights
• 41. Finding Borders
• 42. Money Sums
• 43. Finding Periods
• 44. Minimal Rotation
• 45. Static Range Sum Queries
• 01. Автобус в Джал
• 03. Новый язык программирования
• 05. Trailing Zeros
• 17. Number Spiral
• 23. Apple Division
• 25. Josephus Queries
• 26. Exponentiation
• 29. Coin Combinations I

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб. Сложность Бета

Your task is to calculate the number of trailing zeros in the factorial n!.
For example, 20!=2432902008176640000 and it has 4 trailing zeros.
Input
The only input line has an integer n.
Output
Print the number of trailing zeros in n!.
Constraints
1≤n≤10^9

Example
Input:
20
Output:
4

Для отправки решений необходимо выполнить вход.

www.contester.ru