题解 1285: 阶乘末尾的K位

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

1285: 阶乘末尾的K位

```cpp#include#includeusingnamespacestd;longlongjiecheng(intn){longlongsum=1;for(inti=1;i>n>>k;longlongsum=jiecheng(n);while(sum%10==0)sum/=10;longlong

详细解释,阶乘末尾k位,小白写法,超容易懂!

首先,计算阶乘用数组模拟阶乘。详细解析可以看;https://blog.dotcpp.com/a/98223会了数组模拟阶乘计算后,就可以按照题目的意思编程啦!先附上注释版代码:```cpp#includeusingnamespacestd;constintN=1e4+10;intans[N+10];

1285: 阶乘末尾的K位

摘要:解题思路:最基础+细节注意事项:参考代码:#include<iostream>using namespace std;int getIntegerLength(int n) //求整数的长度妙法{  ……