<循环>整数的个数(C语言) 摘要:#include<stdio.h> int main() { int k,arr[100],c1=0,c2=0,c3=0; scanf("%d", &k); for (int i = …… 题解列表 2023年02月12日 0 点赞 0 评论 671 浏览 评分:0.0
python fj字符串解法 简单无列表函数 N=int(input())s=""#定义一个空字符串foriinrange(N):#进行循环拼接s=s+chr(65+i)+sprint(s) 题解列表 2023年02月12日 0 点赞 0 评论 545 浏览 评分:9.9
<循环>角谷猜想(C语言) 摘要:#include<stdio.h> int main() { int n,x,y; scanf("%d", &n); while (n > 0)//未知循环次数用while语句 {…… 题解列表 2023年02月12日 0 点赞 0 评论 433 浏览 评分:0.0
求具有abcd=(ab+cd)2性质的四位数 解题思路:根据题目要求,答案肯定是平方数,那我们直接先把1000到10000的平方数取出来再判断,比暴力枚举更快.```cpp#include#include#includeusingnamespacestd;intmain(){vectorv;for(inti=32;i<100;i++){v.pus 题解列表 2023年02月12日 0 点赞 0 评论 527 浏览 评分:9.9
<循环>阶乘求和(C语言) 摘要:解题思路:#include<stdio.h> int main() { int n; long long Sn=0, x = 1; scanf("%d", &n); for (in…… 题解列表 2023年02月11日 0 点赞 0 评论 416 浏览 评分:0.0
两种解法哪种更优?还是? 直接for循环求解```cpp#include#includeusingnamespacestd;intmain(){inta,b;for(inti=1000;i 题解列表 2023年02月11日 0 点赞 0 评论 467 浏览 评分:0.0
<循环>满足条件的数累加(C语言) 摘要:#include<stdio.h> int main() { int m, n,sum=0; scanf("%d%d", &m, &n); for (int i = m; i < n …… 题解列表 2023年02月11日 0 点赞 0 评论 901 浏览 评分:9.9
用C语言解决母牛的故事[递归] ####解题思路:递归题目的难点在于每年出生的母牛数量是不固定的,并且是每年都存在不固定数量的母牛加入生产母牛的行列。####递归思路的体现:先去考虑每年能够增加的母牛数量,再考虑这一年所有母牛的数量通过计算得出前8年的母牛数量应该是1234691319.那么每年增加的母牛数量就是1112346那么可 题解列表 2023年02月11日 0 点赞 0 评论 560 浏览 评分:0.0
奥运奖牌计数(C语言) 摘要:#include<stdio.h> int main() { int n,sum1=0,sum2=0,sum3=0,sum,arr[50][3]; scanf("%d", &n); …… 题解列表 2023年02月11日 0 点赞 0 评论 600 浏览 评分:0.0
定义函数判断素数 解题思路:首先了解下素数;素数是指在大于1的自然数中,除了1和它本身以外不再有其他因数的自然数。(也就是只有1跟它本身能整除掉这个数)我们可以利用for循环来判断输入的数字是否为素数。注意事项:1.注意,我们只需要循环到i 题解列表 2023年02月11日 0 点赞 0 评论 475 浏览 评分:0.0 « 12...1543154415451546154715481549...59115912 »