想了半天正确的while,纪念一下 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int n,i; float a,sum; while(scanf("%d",&n)!=EO…… 题解列表 2023年01月19日 0 点赞 0 评论 277 浏览 评分:0.0
挺有趣的哈哈这题目,这个代码有详细解读代码长 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int m,M,n,x,i; scanf("%d %d %d",&M,&n,&x); //M为最大体力值,n为…… 题解列表 2023年01月19日 0 点赞 0 评论 357 浏览 评分:0.0
whilewhilewhile,这个代码短,但是效率低一点,while还不熟练哈哈 摘要:解题思路:swap转换注意事项:参考代码:#include<stdio.h> int main() { int m, n, x; scanf("%d %d %d", &m, &n…… 题解列表 2023年01月19日 0 点赞 0 评论 274 浏览 评分:0.0
while循环又来咯,这个还是除余思想 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int n,k=0; //k,1的个数 scanf("%d",&n); for(int …… 题解列表 2023年01月19日 0 点赞 0 评论 360 浏览 评分:0.0
不用数组,用for直接循环 摘要:解题思路:因为第一个数字开始往后数,在for循环语句中用两个变量啊a,b,a不变,从前往后小于b即可注意事项:一定要初始i,不然不得行参考代码:#include <stdio.h>#include <…… 题解列表 2023年01月19日 0 点赞 0 评论 395 浏览 评分:0.0
1649: 蓝桥杯算法训练VIP-特殊的数字四十 摘要:解题思路:创建一个for循环,里面套一个for循环和一个if判断。注意事项:参考代码:for i in range(1000,10000): cnt = 0 for j in str(i)…… 题解列表 2023年01月19日 0 点赞 0 评论 334 浏览 评分:0.0
一种超简单的方法 摘要:#include int main() { int i,j,n,k,t,sum=0; scanf("%d",&n); int a[n]; for(i=0;i…… 题解列表 2023年01月19日 0 点赞 0 评论 399 浏览 评分:0.0
链队列/循环队列 摘要:解题思路:注意事项:参考代码://linkquene #include <iostream>#include <cstdlib>using namespace std;typedef struct q…… 题解列表 2023年01月19日 0 点赞 0 评论 291 浏览 评分:0.0
我这个应该是挺好理解的吧 摘要:```cpp #include using namespace std; int main() { int n,m; while(cin>>n>>m)//n…… 题解列表 2023年01月19日 0 点赞 0 评论 360 浏览 评分:0.0
1093: 字符逆序 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;#include<string>#include<algorithm>//导入algorith…… 题解列表 2023年01月20日 0 点赞 0 评论 288 浏览 评分:0.0