自定义函数之字符串反转 摘要:解题思路:这道题可以使用数组或者链表来做,我采用的循环链表的方式注意事项:参考代码:typedef struct LinkT{ int num; s…… 题解列表 2025年09月08日 0 点赞 0 评论 551 浏览 评分:0.0
1098: 陶陶摘苹果 摘要:解题思路:这题难度不大,欧耶注意事项:吃好喝好睡好参考代码:/*1098:陶陶能够摘到的苹果的数目**func:TaoPickingApples**intput:@height 陶陶的身高…… 题解列表 2025年09月08日 0 点赞 0 评论 577 浏览 评分:0.0
另一种解题思路 解题思路:阶梯计算,省去重复步骤注意事项:用goto防止重复计算参考代码:#includeusingnamespacestd;intmain(){inta=0;intb=0;cin>>a;if(a-100000>0){a-=100000;b+=10000;}else{b+=a*0. 题解列表 2025年09月08日 0 点赞 0 评论 737 浏览 评分:0.0
1为真,0为假 解题思路:注意事项:参考代码:#includeusingnamespacestd;intmain(){inta,b,c,d;cin>>a;b=a%10;c=(a/10)%10;d=(a/100)%10;cout<<(a==b*b*b+c*c*c+d*d*d)< 题解列表 2025年09月08日 1 点赞 0 评论 541 浏览 评分:7.0 使用gets不能使用fgets,原因:笔者认为第二个测试用例太长了,超过了一行,因此使用gets无限制读取,直到读到空格和回撤符号 #include#include#includeintcompare(constvoid*p1,constvoid*p2){constchar*a=(constchar*)p1;constchar*b=(constchar*)p2;return 题解列表 2025年09月08日 0 点赞 0 评论 460 浏览 评分:0.0 1123-列出最简真分数列表 摘要:代码:#include int main() { for (int i = 0; i …… 题解列表 2025年09月09日 0 点赞 0 评论 484 浏览 评分:0.0 利用vector定义数组大小,static_cast显式转换 解题思路:注意事项:参考代码:#includeusingnamespacestd;#includeintmain(){intn=0;cin>>n;switch(n){case1:{cout<<"2.00"< 题解列表 2025年09月10日 0 点赞 0 评论 511 浏览 评分:0.0 编写题解 1866: 三位数反转 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 646 浏览 评分:0.0 编写题解 2751: 超级玛丽游戏 摘要:#include<bits/stdc++.h>using namespace std;int main(){ cout<<" &…… 题解列表 2025年09月10日 2 点赞 1 评论 987 浏览 评分:10.0 编写题解 2779: 输出绝对值 摘要:#include<bits/stdc++.h>using namespace std;int main(){ double i; &nbs…… 题解列表 2025年09月10日 0 点赞 0 评论 738 浏览 评分:0.0 « 12...5806580758085809581058115812...59235924 »
使用gets不能使用fgets,原因:笔者认为第二个测试用例太长了,超过了一行,因此使用gets无限制读取,直到读到空格和回撤符号 #include#include#includeintcompare(constvoid*p1,constvoid*p2){constchar*a=(constchar*)p1;constchar*b=(constchar*)p2;return 题解列表 2025年09月08日 0 点赞 0 评论 460 浏览 评分:0.0
1123-列出最简真分数列表 摘要:代码:#include int main() { for (int i = 0; i …… 题解列表 2025年09月09日 0 点赞 0 评论 484 浏览 评分:0.0
利用vector定义数组大小,static_cast显式转换 解题思路:注意事项:参考代码:#includeusingnamespacestd;#includeintmain(){intn=0;cin>>n;switch(n){case1:{cout<<"2.00"< 题解列表 2025年09月10日 0 点赞 0 评论 511 浏览 评分:0.0 编写题解 1866: 三位数反转 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 646 浏览 评分:0.0 编写题解 2751: 超级玛丽游戏 摘要:#include<bits/stdc++.h>using namespace std;int main(){ cout<<" &…… 题解列表 2025年09月10日 2 点赞 1 评论 987 浏览 评分:10.0 编写题解 2779: 输出绝对值 摘要:#include<bits/stdc++.h>using namespace std;int main(){ double i; &nbs…… 题解列表 2025年09月10日 0 点赞 0 评论 738 浏览 评分:0.0 « 12...5806580758085809581058115812...59235924 »
编写题解 1866: 三位数反转 摘要:#include<bits/stdc++.h>using namespace std;int main(){ int i; …… 题解列表 2025年09月10日 0 点赞 0 评论 646 浏览 评分:0.0
编写题解 2751: 超级玛丽游戏 摘要:#include<bits/stdc++.h>using namespace std;int main(){ cout<<" &…… 题解列表 2025年09月10日 2 点赞 1 评论 987 浏览 评分:10.0
编写题解 2779: 输出绝对值 摘要:#include<bits/stdc++.h>using namespace std;int main(){ double i; &nbs…… 题解列表 2025年09月10日 0 点赞 0 评论 738 浏览 评分:0.0