有规律的数列求和 摘要:解题思路:注意事项:参考代码:#include<iostream> #include<iomanip> using namespace std; int main() { double m…… 题解列表 2023年09月12日 0 点赞 0 评论 429 浏览 评分:0.0
C++ 数据结构 字符串连接 #include#includeusingnamespacestd;intmain(){stringa,b;stringc[3];for(inti=0;i<3;++i){cin>>a>>b;stringpan;pan=a+b;if(pan.length()>100)pan="ResultStringi 题解列表 2023年09月12日 0 点赞 0 评论 655 浏览 评分:9.9
思路很简单,代码很友好(注释),也很短 摘要:解题思路:1.如果是*直接输出,else就考虑相邻元素,这里的相邻元素是核心,可以先考虑同一行和同一列的相邻元素(曼哈顿距离)abs(i - x) + abs(j - y) < 2 // 上下左右的相…… 题解列表 2023年09月12日 0 点赞 0 评论 561 浏览 评分:9.9
C++ 猴子偷逃问题 //整体思路:反向推理#includeusingnamespacestd;intmain(){intN;ints=1;//表示桃子的数量cin>>N;//表示猴子吃的天数for(inti=1;i 题解列表 2023年09月12日 0 点赞 0 评论 560 浏览 评分:9.9 C语言训练-"水仙花数"问题1 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b,c,i; bool p; cin>>…… 题解列表 2023年09月12日 0 点赞 0 评论 506 浏览 评分:8.0 C++ 温度换算 摘要:解题思路:注意事项: 简单编程,注意用float参考代码:#include<bits/stdc++.h> using namespace std; int main() {…… 题解列表 2023年09月10日 0 点赞 0 评论 714 浏览 评分:8.7 按位与(位运算)(菜鸟教程)(基础) 摘要: //按位与:按二进制位进行"与"(&)运算 1100+1111=1100 只有1&1=1,其他都是0;解题思路: 将第z到第y位进行(1<<i)得到1110000 与n进行按位与 …… 题解列表 2023年09月10日 0 点赞 0 评论 836 浏览 评分:6.0 1067: 二级C语言-分段函数(c++题解) 摘要:解题思路:x<0时求绝对值,x>=0并<2时求(x+1)的平方根,x>=2并<4时求(x+2)的5次方,否则求2x+5。注意事项:保留2位小数参考代码:#include <bits/stdc++.h>…… 题解列表 2023年09月10日 1 点赞 1 评论 890 浏览 评分:9.9 循环移位(基础) 摘要:解题思路: 循环就是转圈 建议画图理解注意事项: 无参考代码:#include<iostream> using namespace std; const int N=10010; unsig…… 题解列表 2023年09月10日 0 点赞 0 评论 643 浏览 评分:9.9 编写题解 1009: [编程入门]数字的处理与判断 摘要:解题思路:利用strlen函数求出数组有效大小,即数字位数。再利用swich选择语句根据不同位数来进行输出注意事项:注意加上头文件#include<string.h>#include<iostream…… 题解列表 2023年09月09日 0 点赞 0 评论 610 浏览 评分:9.9 « 12...415416417418419420421...16501651 »
C语言训练-"水仙花数"问题1 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b,c,i; bool p; cin>>…… 题解列表 2023年09月12日 0 点赞 0 评论 506 浏览 评分:8.0
C++ 温度换算 摘要:解题思路:注意事项: 简单编程,注意用float参考代码:#include<bits/stdc++.h> using namespace std; int main() {…… 题解列表 2023年09月10日 0 点赞 0 评论 714 浏览 评分:8.7
按位与(位运算)(菜鸟教程)(基础) 摘要: //按位与:按二进制位进行"与"(&)运算 1100+1111=1100 只有1&1=1,其他都是0;解题思路: 将第z到第y位进行(1<<i)得到1110000 与n进行按位与 …… 题解列表 2023年09月10日 0 点赞 0 评论 836 浏览 评分:6.0
1067: 二级C语言-分段函数(c++题解) 摘要:解题思路:x<0时求绝对值,x>=0并<2时求(x+1)的平方根,x>=2并<4时求(x+2)的5次方,否则求2x+5。注意事项:保留2位小数参考代码:#include <bits/stdc++.h>…… 题解列表 2023年09月10日 1 点赞 1 评论 890 浏览 评分:9.9
循环移位(基础) 摘要:解题思路: 循环就是转圈 建议画图理解注意事项: 无参考代码:#include<iostream> using namespace std; const int N=10010; unsig…… 题解列表 2023年09月10日 0 点赞 0 评论 643 浏览 评分:9.9
编写题解 1009: [编程入门]数字的处理与判断 摘要:解题思路:利用strlen函数求出数组有效大小,即数字位数。再利用swich选择语句根据不同位数来进行输出注意事项:注意加上头文件#include<string.h>#include<iostream…… 题解列表 2023年09月09日 0 点赞 0 评论 610 浏览 评分:9.9