自定义函数之字符类型统计-简单方法解决 摘要:解题思路:大概就是取余,求整思路注意事项:参考代码:#include<stdio.h>int main(){ int n, a, b, c, d; scanf("%d", &n); …… 题解列表 2024年06月26日 0 点赞 0 评论 185 浏览 评分:0.0
主用分支结构 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a; scanf("%d",&a); if(a%3==0 && a%5==0 && a…… 题解列表 2024年06月26日 0 点赞 0 评论 257 浏览 评分:0.0
成了,经典的约瑟夫环问题 有n人围成一圈,顺序排号。从第1个人开始报数(从1到3报数),凡报到3的人退出圈子,问最后留下的是原来的第几号的那位。 摘要:解题思路:建立c++的list容器,将数据输入,每搁三个判断一下,删除,继续判断,最后找到剩余的元素,输出注意事项:本次使用,学到了auto的新用法 参考代码:#include<iostream> …… 题解列表 2024年06月27日 0 点赞 0 评论 216 浏览 评分:0.0
按照题目思路解题 摘要:解题思路:注意事项:参考代码:void Calculate(int in) { int drink = 0; //记录累计喝下的汽水个数 int replace = 0; //…… 题解列表 2024年06月27日 0 点赞 0 评论 177 浏览 评分:0.0
递归实现python 递归 摘要:def max(a,b): r = a % b while r != 0: a = b b =&n 题解列表 2024年06月27日 1 点赞 0 评论 347 浏览 评分:0.0
台球碰撞题目答案解析 摘要:解题思路:我这个肯定不是最优解,大家看看就行。其实需要注意的就是圆和矩形相切的问题以及碰撞之前圆心的运动轨迹和碰撞之后的圆心的运动轨迹是互相垂直的就行了。注意事项:注意角度是要转换到PI上,in_3.…… 题解列表 2024年06月28日 0 点赞 0 评论 271 浏览 评分:0.0
二分法求解过程 摘要:解题思路:注意事项:参考代码:#include<stdint.h>#include<stdio.h>#include<math.h>//这里主要是考察二分法求方程的根#define EPS …… 题解列表 2024年06月29日 0 点赞 0 评论 285 浏览 评分:0.0
编写题解 1676: 数据结构-链表的基本操作 摘要: #include #include #include typedef struct node { int n; struct n…… 题解列表 2024年06月30日 1 点赞 0 评论 274 浏览 评分: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
题解 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 评论 129 浏览 评分:0.0