C++ 猴子偷逃问题 摘要: //整体思路:反向推理 #include using namespace std; int main() { int N;int s = 1;//表示桃子的数量 …… 题解列表 2023年09月12日 0 点赞 0 评论 352 浏览 评分:9.9
C语言训练-"水仙花数"问题1 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b,c,i; bool p; cin>>…… 题解列表 2023年09月12日 0 点赞 0 评论 357 浏览 评分:8.0
C++ 温度换算 摘要:解题思路:注意事项: 简单编程,注意用float参考代码:#include<bits/stdc++.h> using namespace std; int main() {…… 题解列表 2023年09月10日 0 点赞 0 评论 464 浏览 评分:8.7
按位与(位运算)(菜鸟教程)(基础) 摘要: //按位与:按二进制位进行"与"(&)运算 1100+1111=1100 只有1&1=1,其他都是0;解题思路: 将第z到第y位进行(1<<i)得到1110000 与n进行按位与 …… 题解列表 2023年09月10日 0 点赞 0 评论 524 浏览 评分: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 评论 697 浏览 评分:9.9
循环移位(基础) 摘要:解题思路: 循环就是转圈 建议画图理解注意事项: 无参考代码:#include<iostream> using namespace std; const int N=10010; unsig…… 题解列表 2023年09月10日 0 点赞 0 评论 417 浏览 评分:9.9
编写题解 1009: [编程入门]数字的处理与判断 摘要:解题思路:利用strlen函数求出数组有效大小,即数字位数。再利用swich选择语句根据不同位数来进行输出注意事项:注意加上头文件#include<string.h>#include<iostream…… 题解列表 2023年09月09日 0 点赞 0 评论 432 浏览 评分:9.9
1157: 亲和数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int zys(int x){ int sum=0; for(int…… 题解列表 2023年09月09日 0 点赞 0 评论 295 浏览 评分:9.9
1017: [编程入门]完数的判断 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int wan(int x){ int sum=0; for(int…… 题解列表 2023年09月09日 0 点赞 0 评论 334 浏览 评分:0.0
☆☆☆数组模拟队列实现队列操作☆☆☆ 摘要:解题思路:使用数组模拟的思想来解题。定义一个数组来表示我们的队列,然后定义队头和队尾,一般来讲非循环队列队尾设置为-1,循环队列的队尾可以设置为0当进行插入操作时,只需队尾++即可,删除元素时只需让队…… 题解列表 2023年09月08日 0 点赞 0 评论 643 浏览 评分:9.9