1198: 取石子游戏 摘要:核心: 威佐夫博弈 a == (int)((b - a) * ((sqrt(5) + 1) / 2)):先手输,其他则先手赢代码:from math import sqrt while T…… 题解列表 2024年08月30日 0 点赞 0 评论 186 浏览 评分:0.0
1157: 亲和数(C++) 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n; cin >> n; while(…… 题解列表 2024年08月30日 1 点赞 0 评论 547 浏览 评分:9.9
呜呜呜终于写出来了。我与链表的爱恨情仇 摘要:解题思路://用到链表的基础用法,链表中节点按照成员排序的话用插入法比较好用。注意事项://第一次写链表题目参考代码:#include <stdio.h> #include <stdlib.h> …… 题解列表 2024年08月30日 3 点赞 0 评论 441 浏览 评分:9.9
链表合并(先排序,后合并)不用排序算法 摘要:这个题好像有两种思路: 1.先合并,后排序 2.先排序,后合并 看了大家的解法都是第一种思路,我想试一下第二种思路。因为两个链表从键盘输入的时候是学号是无序的,所以我想能不能创建链表的时候就按学…… 题解列表 2024年08月30日 0 点赞 0 评论 277 浏览 评分:0.0
C语言训练-阶乘和数* 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; const int N = 10; int a[N]; int main() {…… 题解列表 2024年08月30日 0 点赞 0 评论 529 浏览 评分:9.9
1156题解(C语言) 摘要:```c #include #include // 计算数字每位的立方和,并判断该和是否等于原数字 int fun(int i) { int n = i, sum = 0;…… 题解列表 2024年08月29日 0 点赞 0 评论 205 浏览 评分:0.0
题解(C语言) 摘要:```c #include #include #include typedef struct { int data; // 存储符合条件的数字 int sig…… 题解列表 2024年08月29日 0 点赞 0 评论 182 浏览 评分:0.0
1190: 剔除相关数 摘要:核心:就挺难说的,暴力求解吧代码:def func(l): c = [] l1 = [0] * len(l) res = [] for i in range(l…… 题解列表 2024年08月29日 0 点赞 0 评论 190 浏览 评分:0.0
2880: 计算鞍点 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;long long a[100][100],n,sum=0;int main(){…… 题解列表 2024年08月29日 1 点赞 0 评论 405 浏览 评分:0.0
[编程入门]自定义函数之字符类型统计 摘要:```java import java.util.Scanner; public class Main { public static void main(String[] args) {…… 题解列表 2024年08月29日 0 点赞 0 评论 315 浏览 评分:9.9