2936: 简单算术表达式求值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll jiafa (ll x,ll y,…… 题解列表 2024年06月30日 0 点赞 0 评论 292 浏览 评分:0.0
2936: 简单算术表达式求值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll jiafa (ll x,ll y,…… 题解列表 2024年06月30日 0 点赞 0 评论 184 浏览 评分:0.0
题解 1029: [编程入门]自定义函数处理素数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int sushu(int n){ int g; for(int i=2;i<=s…… 题解列表 2024年06月30日 0 点赞 0 评论 162 浏览 评分:0.0
2247: 蓝桥杯算法提高-输出三个整数的最大数 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;ll myMax (ll x,ll y,…… 题解列表 2024年06月30日 0 点赞 0 评论 153 浏览 评分:0.0
题解 1852: 求1+2+3+...+n的值 摘要:```cpp #include using namespace std; typedef long long ll; const int N=1e7+5; ll man(ll x) { …… 题解列表 2024年06月30日 0 点赞 0 评论 127 浏览 评分:0.0
1852: 求1+2+3+...+n的值 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;typedef long long ll;//自定义//求1+2+3+......…… 题解列表 2024年06月30日 0 点赞 0 评论 152 浏览 评分:0.0
成了,经典的约瑟夫环问题 有n人围成一圈,顺序排号。从第1个人开始报数(从1到3报数),凡报到3的人退出圈子,问最后留下的是原来的第几号的那位。 摘要:解题思路:建立c++的list容器,将数据输入,每搁三个判断一下,删除,继续判断,最后找到剩余的元素,输出注意事项:本次使用,学到了auto的新用法 参考代码:#include<iostream> …… 题解列表 2024年06月27日 0 点赞 0 评论 216 浏览 评分:0.0
1231: 杨辉三角 摘要:```cpp #include using namespace std; int a[1000][1000]; int main() { int n; while(cin>>n) { …… 题解列表 2024年06月27日 1 点赞 0 评论 441 浏览 评分:9.9
规范解答 一个数如果恰好等于不包含它本身所有因子之和,这个数就称为"完数"。 摘要:解题思路:读取,然后找一个函数判断是否是完数,如果是,就遍历因子打印注意事项:在处理两个因子相同时,只添加其中一个即可参考代码:#include<iostream>#include <cmath>us…… 题解列表 2024年06月26日 0 点赞 0 评论 153 浏览 评分:0.0
2836: 数组逆序重放 摘要:解题思路:其实很简单。只需要输入数组后,将数组逆序输出就可以了。注意事项:逆序输出是“i--”,别写成“i--”了,否则会陷入死循环。参考代码:#include<bits/stdc++.h>using…… 题解列表 2024年06月26日 0 点赞 0 评论 251 浏览 评分:9.9