P1018-题解(C语言代码) #includeintmain(void){longlongpro=1;inti=0,j=0,n=0,k=0;charstr[16]={'\0',};scanf("%d%d",&n,&k);for(i=n;i>=1;--i){pro*=i;}while(0==pro%10){pro/=10;}for( 题解列表 2020年03月04日 0 点赞 0 评论 1518 浏览 评分:9.9
P1018 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int b[21],s[100];int n,k;int main(){ int i,j,t,flag; int w,r,q; scan…… 题解列表 2018年02月12日 0 点赞 0 评论 1621 浏览 评分:0.0
P1018 (C++代码) 摘要:#include <iostream> using namespace std; int main() { int k, n; long long sum = 1; cin >> n…… 题解列表 2018年03月31日 1 点赞 0 评论 1704 浏览 评分:0.0
P1018 (C语言代码) 解题思路:先求出阶乘,然后去掉后面的0,再把数字转换为字符串,然后再取后面的子串即可。注意事项:转换字符串时使用了sprintf函数,把数字转换为字符串,该函数有3个参数:第1个参数是要保存转换结果字符串的字符数组,第2个参数是输出格式,第3个参数是要转换的整数。 题解列表 2018年10月11日 0 点赞 0 评论 1874 浏览 评分:0.0
P1018 (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> int main() { int a[100],cnt=0,n,m; long long sum=1; scanf("…… 题解列表 2019年05月05日 0 点赞 0 评论 1873 浏览 评分:0.0
阶乘末尾的K位 摘要:解题思路:注意事项:参考代码:#include <stdio.h>long long a[100];int main(){ int n,m,k=0,i; long lo…… 题解列表 2022年11月13日 0 点赞 0 评论 499 浏览 评分:0.0