<循环>整数的个数(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 评论 329 浏览 评分:0.0
python fj字符串解法 简单无列表函数 摘要:N=int(input())s=""#定义一个空字符串for i in range(N): #进行循环拼接 s=s+chr(65+i)+sprint(s)…… 题解列表 2023年02月12日 0 点赞 0 评论 354 浏览 评分:9.9
<循环>角谷猜想(C语言) 摘要:#include<stdio.h> int main() { int n,x,y; scanf("%d", &n); while (n > 0)//未知循环次数用while语句 {…… 题解列表 2023年02月12日 0 点赞 0 评论 286 浏览 评分:0.0
求具有abcd=(ab+cd)2性质的四位数 摘要:解题思路: 根据题目要求,答案肯定是平方数,那我们直接先把1000到10000的平方数取出来再判断,比暴力枚举更快. ```cpp #include #include #include u…… 题解列表 2023年02月12日 0 点赞 0 评论 376 浏览 评分: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 评论 252 浏览 评分:0.0
两种解法哪种更优?还是? 摘要:直接for循环求解 ```cpp #include #include using namespace std; int main() { int a,b; for(int i=10…… 题解列表 2023年02月11日 0 点赞 0 评论 318 浏览 评分: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 评论 702 浏览 评分:9.9
用C语言解决母牛的故事[递归] 摘要:#### 解题思路:递归 题目的难点在于每年出生的母牛数量是不固定的,并且是每年都存在不固定数量的母牛加入生产母牛的行列。 #### 递归思路的体现: 先去考虑每年能够增加的母牛数量,再考虑这一…… 题解列表 2023年02月11日 0 点赞 0 评论 382 浏览 评分: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 评论 343 浏览 评分:0.0
定义函数判断素数 摘要:解题思路:首先了解下素数;素数是指在大于1的自然数中,除了1和它本身以外不再有其他因数的自然数。(也就是只有1跟它本身能整除掉这个数)我们可以利用for循环来判断输入的数字是否为素数。注意事项:1.注…… 题解列表 2023年02月11日 0 点赞 0 评论 294 浏览 评分:0.0