1157题解(C语言) 摘要:```c #include // 函数 yue_shu 用于计算一个整数 n 的所有真约数(除了它本身)的和 int yue_shu(int n){ int sum = 0; //…… 题解列表 2024年08月30日 1 点赞 0 评论 417 浏览 评分:10.0
题解 2773: 计算线段长度 math.h头文件 摘要:??解题思路??此题中两点之间存在四种情况:1.两点 X坐标 相同表示为: Xa == Xb解:两点 Y坐标 差值的 绝对值2.两点 Y坐标 相同表示为: Ya == Yb解:两点 X坐标 差值的 绝…… 题解列表 2024年08月30日 0 点赞 0 评论 250 浏览 评分:9.9
1159: 偶数求和 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n, m; while(cin >> n …… 题解列表 2024年08月30日 0 点赞 0 评论 416 浏览 评分:9.9
1197: 发工资咯(贪心算法) 摘要:核心:票票从大开始扣,数量是最少的代码:while True: l = [int(x) for x in input().split()] n = l[0] if n =…… 题解列表 2024年08月30日 0 点赞 0 评论 308 浏览 评分:0.0
1198: 取石子游戏 摘要:核心: 威佐夫博弈 a == (int)((b - a) * ((sqrt(5) + 1) / 2)):先手输,其他则先手赢代码:from math import sqrt while T…… 题解列表 2024年08月30日 0 点赞 0 评论 174 浏览 评分:0.0
1157: 亲和数(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n; cin >> n; while(…… 题解列表 2024年08月30日 1 点赞 0 评论 535 浏览 评分:9.9
呜呜呜终于写出来了。我与链表的爱恨情仇 摘要:解题思路://用到链表的基础用法,链表中节点按照成员排序的话用插入法比较好用。注意事项://第一次写链表题目参考代码:#include <stdio.h> #include <stdlib.h> …… 题解列表 2024年08月30日 3 点赞 0 评论 431 浏览 评分:9.9
链表合并(先排序,后合并)不用排序算法 摘要:这个题好像有两种思路: 1.先合并,后排序 2.先排序,后合并 看了大家的解法都是第一种思路,我想试一下第二种思路。因为两个链表从键盘输入的时候是学号是无序的,所以我想能不能创建链表的时候就按学…… 题解列表 2024年08月30日 0 点赞 0 评论 261 浏览 评分:0.0
C语言训练-阶乘和数* 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; const int N = 10; int a[N]; int main() {…… 题解列表 2024年08月30日 0 点赞 0 评论 506 浏览 评分:9.9
1156题解(C语言) 摘要:```c #include #include // 计算数字每位的立方和,并判断该和是否等于原数字 int fun(int i) { int n = i, sum = 0; …… 题解列表 2024年08月29日 0 点赞 0 评论 189 浏览 评分:0.0