题解 1285: 阶乘末尾的K位

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

筛选

阶乘末尾的K位

摘要:解题思路:注意事项:参考代码:#include <stdio.h>long long a[100];int main(){         int n,m,k=0,i;         long lo……

阶乘末尾的K位

解题思路:注意事项:参考代码:frommathimport*n,k=map(int,input().split())a=str(factorial(n))whilea.endswith('0'):a=a[:len(a)-1]print(a[-k:])