#B4268. [朝阳区小学组 2019] nonzero

[朝阳区小学组 2019] nonzero

Cannot parse: bad indentation of a mapping entry (3:10) 1 | time: 1s 2 | memory: 131072 3 | - input: 1.in --------------^ 4 | output: 1.out 5 | - input: 2.in

题目背景

数据为洛谷自造。

题目描述

小明最近对阶乘很感兴趣,但是阶乘增长的太快了。如 13!13! 就必须用 6464 位整数类型来存储,70!70! 即使浮点数也存不下。小明想知道阶乘最后面的非零位是多少。

例如:5!=1×2×3×4×5=1205!=1\times 2\times 3\times 4\times 5=120,所以 5!5! 最后面的非零位是 22。

$7!=1\times 2\times 3\times 4\times 5\times 6\times 7=5040$,所以 7!7! 最后面的非零位是 44。

输入格式

一行,一个整数 NN(N≤1000N\leq1000)。

输出格式

一行,输出 N!N! 最后面的非零位。

输入输出样例 #1

输入 #1

7

输出 #1

4