末尾零

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目背景

翻译自 CSES-1618 题。

题目描述

你的任务是计算 n!n! 中末尾零的个数。

例如,20!=243290200817664000020!=2432902008176640000,其末尾有 44 个零。

输入格式

输入一个正整数 nn

输出格式

输出一行一个整数表示答案。

样例

20
4

说明/提示

1n1091\le n \le 10^9

CSES练习一 枚举、模拟、数学

Not Claimed
Status
Done
Problem
19
Open Since
2025-5-1 0:00
Deadline
2025-6-2 23:59
Extension
24 hour(s)