蓝桥杯2014年第五届真题-拼接平方数 (C++代码)简单通解 摘要:解题思路:注意事项:参考代码://1.先求所有平方数,缩小范围//2.只能拆分成左边数字和右边数字,通过求商和求余获得#include<iostream>#include<cmath>using na…… 题解列表 2024年12月08日 0 点赞 0 评论 140 浏览 评分:0.0
1727: 首字母大写 ! 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义一个字符串变量s1,用于存储输入…… 题解列表 2024年12月08日 0 点赞 0 评论 174 浏览 评分:0.0
编写题解 2797: 最高的分数 摘要:解题思路:本题使用打擂台法解决注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long n;cin>>n; …… 题解列表 2024年12月08日 1 点赞 0 评论 242 浏览 评分:10.0
编写题解 1765: 循环入门练习2 摘要:解题思路:注意事项:注意这道题有两种解法参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int sum=0;for(int…… 题解列表 2024年12月08日 1 点赞 2 评论 203 浏览 评分:10.0
编写题解 3010: 奇偶数之和 摘要:解题思路:注意事项:注意要定义两个不同的sum!参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long n;cin>…… 题解列表 2024年12月08日 0 点赞 2 评论 358 浏览 评分:9.9
编写题解 2794: 求平均年龄 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int n,sum=0; cin>>n; …… 题解列表 2024年12月08日 1 点赞 2 评论 480 浏览 评分:10.0
1072: 汽水瓶(简单易懂) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,sum; while (cin >> n) …… 题解列表 2024年12月07日 3 点赞 1 评论 429 浏览 评分:10.0
C语言训练-排序问题(2)C++使用sort排序 摘要:解题思路:自定义cmp,使sort()为降序函数注意事项:参考代码:#include<iostream>using namespace std;#include<algorithm>bool cmp(…… 题解列表 2024年12月07日 1 点赞 0 评论 328 浏览 评分:0.0
1725: 统计字符 超简单做法 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义两个字符串变量s1和s2 …… 题解列表 2024年12月07日 0 点赞 0 评论 196 浏览 评分:0.0
检验每个数位上的值并计数:临时变量、while属性,进位位置区分 摘要:解题思路:1.检验每个数位上的值并计数:while;%10求模;count++;/10更新。2.临时变量:转换for与while循环的区分属性:while会从0-n全部循环一遍,只用1次,内部/10迭…… 题解列表 2024年12月07日 0 点赞 0 评论 199 浏览 评分:0.0