平方和与立方和题解 c++ 摘要:解题思路: 这题不难,主要思路是判断奇偶,然后分别求各个奇数的立方和以及各个偶数的平方和并输出 注意事项: 在新一轮循环前要对m,n清零!!!不然后几组的数据是在前几组数据上进行相加 参考代码…… 题解列表 2022年04月25日 0 点赞 0 评论 462 浏览 评分:9.0
题解 大小写转换 简单易懂 摘要:解题思路: 1.利用while函数输入字符串s 2.当输入的字符串为 End of file 跳出循环 3.用islower函数用于判断字符是否为小写字母(a-z) 4.int toupper…… 题解列表 2022年04月24日 0 点赞 0 评论 340 浏览 评分:0.0
编写题解 1249: 简单编码 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main() { string s; wh…… 题解列表 2022年04月24日 0 点赞 0 评论 380 浏览 评分:0.0
编写题解 1248: 简单的事情 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;unsigned long long int jiecheng(int n){ if(n…… 题解列表 2022年04月24日 0 点赞 0 评论 269 浏览 评分:0.0
C++进制转换输出 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a; cin>>a; cout<<oct<<…… 题解列表 2022年04月24日 0 点赞 0 评论 279 浏览 评分:0.0
小数点后保留N位 摘要:解题思路:注意事项:参考代码:#include<iostream>#include<iomanip>using namespace std;int main(){ float a,c; c…… 题解列表 2022年04月24日 0 点赞 0 评论 261 浏览 评分:0.0
for的引用破解密码 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ string s; cin>>s; for(auto…… 题解列表 2022年04月24日 0 点赞 0 评论 255 浏览 评分:0.0
A+B for Input-Output Practice (IV) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,i,sum=0; cin>>n; whi…… 题解列表 2022年04月24日 0 点赞 0 评论 213 浏览 评分:0.0
1084: 用筛法求之N内的素数。 摘要:解题思路:(1)记得之前做过一样的题目发过题解了,这次的区别可能就是用 vector 构造数组了吧。(2)原理很简单,不管一个数是不是素数,它自身的倍数一定不是素数,建一个 bool 数组不停地遍历+…… 题解列表 2022年04月23日 0 点赞 0 评论 296 浏览 评分:9.9
1083: Hello, world! 摘要:解题思路:什么 b 题目啊,我一直在想怎么才能输入一串整数后自动结束,因为题目强调了没有 EOF,我还以为是有什么非常规接收输入的办法,结果随手提交发现通过了。那你写那么多条件干嘛?注意事项:不是很懂…… 题解列表 2022年04月23日 0 点赞 0 评论 542 浏览 评分:9.9