2163二分法查找最接近的元素 摘要:解题思路:注意事项:在比较的时候需要注意取绝对值(abs函数)比较,不然会出错。参考代码:#include <bits/stdc++.h>using namespace std;int findClo…… 题解列表 2024年12月28日 0 点赞 0 评论 408 浏览 评分:10.0
1768: 循环入门练习5题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n; cin>>n; for(in…… 题解列表 2024年12月28日 0 点赞 0 评论 213 浏览 评分:0.0
1767: 循环入门练习4题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int sum=0; int n; cin…… 题解列表 2024年12月28日 0 点赞 0 评论 132 浏览 评分:0.0
1575递归倒置字符c++递归法简单明了解决方案 摘要:解题思路:此处使用swap方法进行字符交换,可以使代码更简洁更简单,只需要在定义的一个方法中传输该字符与字符数组左右的边界。当左边界大于等一有边界就可以返回了,这样也可以使得输入n=1时也能返回。再使…… 题解列表 2024年12月28日 0 点赞 0 评论 483 浏览 评分:10.0
1199哥德巴赫曾猜测c++简洁题解 摘要:解题思路:首先需要一个方法来判断一个数字是否为素数,这样可以做到简略代码量的工作。判断两个素数加起来是否为输入的数字时,只需要判断第i个与第n-i个是不是素数就行了,不需要多判断二者相加。注意事项:因…… 题解列表 2024年12月28日 2 点赞 0 评论 413 浏览 评分:6.0
编写题解 1051: [编程入门]结构体之成绩统计2(注释清晰 简单易懂) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct student { …… 题解列表 2024年12月27日 3 点赞 0 评论 988 浏览 评分:10.0
无聊的星期五 摘要:#include <stdio.h> #include<stdlib.h> int main() { char c; int sum = 0; while ((c = getchar…… 题解列表 2024年12月27日 0 点赞 0 评论 449 浏览 评分:0.0
无聊的星期五 摘要:解题思路:注意事项:#include <stdio.h> #include<stdlib.h> int main() { int x, y; scanf_s("%d %d", &x, &…… 题解列表 2024年12月27日 0 点赞 0 评论 511 浏览 评分:0.0
编写题解 1050: [编程入门]结构体之成绩记录(注释清晰 简单易懂) 摘要:解题思路:注意事项:参考代码:#include<stdio.h> struct student{ …… 题解列表 2024年12月27日 5 点赞 0 评论 749 浏览 评分:10.0
无聊的星期五 摘要:解题思路:注意事项:#include <stdio.h> #include<stdlib.h> int main() { for (int i = 1000; i < 9999;i++) {…… 题解列表 2024年12月27日 0 点赞 0 评论 489 浏览 评分:0.0