1014: [编程入门]阶乘求和 摘要:解题思路:注意事项:注意溢出参考代码:(小白求解)下面代码不能通过,错误50#include<stdio.h>int main(){ int n,j,i=1; long int S=0; …… 题解列表 2021年08月13日 0 点赞 0 评论 204 浏览 评分:9.9
1019数组解法 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>int fun(int n){ int a[4],i; while(n!=0) {…… 题解列表 2021年08月13日 0 点赞 0 评论 200 浏览 评分:0.0
1013: [编程入门]Sn的公式求和 摘要:参考代码:#include<stdio.h>int main(){ int n,S=0,i,j=2; scanf("%d",&n); for(i=0;i<n;i++) { …… 题解列表 2021年08月13日 0 点赞 0 评论 210 浏览 评分:0.0
筛选N以内的素数,简单优化过的算法 摘要:解题思路:此算法进行了简单的优化,只找n以内的奇数,并且验证一个数i是否为素数时用i%j(j=2,3,4…,i/2)。(实际上只需增加到i的平方根,因为如果i能拆成两个整数的积,通常这两个整数位于i的…… 题解列表 2021年08月13日 0 点赞 0 评论 280 浏览 评分:9.9
1020: [编程入门]猴子吃桃的问题c语言,简单解析 摘要:#include<stdio.h> int main() { int n,sum=1; scanf("%d",&n); while(--n) sum=(su…… 题解列表 2021年08月13日 0 点赞 0 评论 234 浏览 评分:9.9
自由下落的距离计算,c语言简单思路代码,带解析 摘要:解题思路:见注释注意事项:sum每次加上上次落地后反弹高度的二倍,总路程为sum-m一定要初始化sum=0,不然判定答案错误参考代码:#include<stdio.h> int main() { …… 题解列表 2021年08月12日 0 点赞 0 评论 228 浏览 评分:9.9
简单代码易理解 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int x,y; scanf("%d",&x); if(x>=1) if(x<10) y=2*x-1; …… 题解列表 2021年08月12日 0 点赞 0 评论 316 浏览 评分:0.0
简单代码易理解 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,b; while(~scanf("%d%d",&a,&b)) printf("%d\n",a+b)…… 题解列表 2021年08月12日 0 点赞 0 评论 281 浏览 评分:0.0
简单代码易理解 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ char c1,c2,c3,c4,c5; scanf("%c%c%c%c%c",&c1,&c2,&c3,&c4…… 题解列表 2021年08月12日 0 点赞 0 评论 232 浏览 评分:0.0
简单代码易理解 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ double a; scanf("%lf",&a); printf("%f\n%.5f\n%e\n%g",a,…… 题解列表 2021年08月12日 0 点赞 0 评论 336 浏览 评分:0.0