1190: 剔除相关数 摘要:核心:就挺难说的,暴力求解吧代码:def func(l): c = [] l1 = [0] * len(l) res = [] for i in range(l…… 题解列表 2024年08月29日 0 点赞 0 评论 165 浏览 评分:0.0
题解(C语言) 摘要:```c #include #include #include typedef struct { int data; // 存储符合条件的数字 int sig…… 题解列表 2024年08月29日 0 点赞 0 评论 157 浏览 评分:0.0
1156题解(C语言) 摘要:```c #include #include // 计算数字每位的立方和,并判断该和是否等于原数字 int fun(int i) { int n = i, sum = 0; …… 题解列表 2024年08月29日 0 点赞 0 评论 181 浏览 评分:0.0
链表合并(先排序,后合并)不用排序算法 摘要:这个题好像有两种思路: 1.先合并,后排序 2.先排序,后合并 看了大家的解法都是第一种思路,我想试一下第二种思路。因为两个链表从键盘输入的时候是学号是无序的,所以我想能不能创建链表的时候就按学…… 题解列表 2024年08月30日 0 点赞 0 评论 248 浏览 评分:0.0
1198: 取石子游戏 摘要:核心: 威佐夫博弈 a == (int)((b - a) * ((sqrt(5) + 1) / 2)):先手输,其他则先手赢代码:from math import sqrt while T…… 题解列表 2024年08月30日 0 点赞 0 评论 164 浏览 评分:0.0
1197: 发工资咯(贪心算法) 摘要:核心:票票从大开始扣,数量是最少的代码:while True: l = [int(x) for x in input().split()] n = l[0] if n =…… 题解列表 2024年08月30日 0 点赞 0 评论 296 浏览 评分:0.0
1159题解(C语言) 摘要:```c #include #define MAX 101 void fun(int n, int m) { int a[MAX]; // 存储生成的数字的数组 int …… 题解列表 2024年08月30日 0 点赞 0 评论 498 浏览 评分:0.0
各位大佬看看我的 摘要:解题思路:注意事项:参考代码:#include <stdio.h>void SumAge(char a[4]) { for (size_t i = 0; i <4; i++) { …… 题解列表 2024年08月31日 1 点赞 0 评论 171 浏览 评分:0.0
简单的a+b (C语言代码) 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int a,b; while(cin>>a>>b)cout…… 题解列表 2024年09月01日 0 点赞 0 评论 438 浏览 评分:0.0
定义一个带参的宏,使两个参数的值互换,并写出程序,输入两个数作为使用宏时的实参。输出已交换后的两个值。 摘要:解题思路:注意事项:参考代码:#include <stdio.h>#pragma warning(disable : 4996)// 定义一个带参的宏,用于交换两个数的值#define chang(a…… 题解列表 2024年09月01日 1 点赞 0 评论 705 浏览 评分:0.0