1198: 取石子游戏 摘要:核心: 威佐夫博弈 a == (int)((b - a) * ((sqrt(5) + 1) / 2)):先手输,其他则先手赢代码:from math import sqrt while T…… 题解列表 2024年08月30日 0 点赞 0 评论 413 浏览 评分:0.0
1197: 发工资咯(贪心算法) 摘要:核心:票票从大开始扣,数量是最少的代码:while True: l = [int(x) for x in input().split()] n = l[0] if n =…… 题解列表 2024年08月30日 0 点赞 0 评论 567 浏览 评分:0.0
1159: 偶数求和 摘要:解题思路:注意事项:参考代码:#include<iostream> using namespace std; int main() { int n, m; while(cin >> n …… 题解列表 2024年08月30日 0 点赞 0 评论 755 浏览 评分:9.9
题解 2773: 计算线段长度 math.h头文件 ??解题思路??此题中两点之间存在四种情况:1.两点X坐标相同表示为:Xa==Xb解:两点Y坐标差值的绝对值2.两点Y坐标相同表示为:Ya==Yb解:两点X坐标差值的绝对值3.两点X,Y坐标均相同表示为:Xa==Xb&&Ya==Yb解:两点距离为04.两点X, 题解列表 2024年08月30日 0 点赞 0 评论 538 浏览 评分:9.9
1157题解(C语言) ```c#include//函数yue_shu用于计算一个整数n的所有真约数(除了它本身)的和intyue_shu(intn){intsum=0;//初始化sum变量用于累加约数//遍历所有可能的约数i,从1到n/2(因为超过n/2的数不可能是n的约数)for(inti=1;i 题解列表 2024年08月30日 1 点赞 0 评论 809 浏览 评分:10.0
指针/引用练习之交换数字 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int swap(int *a,int *b){ int temp; temp=*a; *a=*b; *b=temp; return …… 题解列表 2024年08月30日 0 点赞 0 评论 908 浏览 评分:9.9
1159题解(C语言) ```c#include#defineMAX101voidfun(intn,intm){inta[MAX];//存储生成的数字的数组intnum=0;//用于跟踪当前存储到数组中的数字//偶数for(inti=0;i 题解列表 2024年08月30日 0 点赞 0 评论 801 浏览 评分:0.0 判断一年的第几天 摘要:参考代码:#include<stdio.h>struct date { int year; int month; int day;};int main() { struct d…… 题解列表 2024年08月31日 1 点赞 0 评论 388 浏览 评分:9.9 蓝桥杯2023年第十四届省赛真题-冶炼金属 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { int n; scanf("%d",&n); int max=1000000000,min=…… 题解列表 2024年08月31日 0 点赞 0 评论 949 浏览 评分:10.0 1160: 出圈 (vector , 公式法) 摘要:解题思路:Vector注意事项:删除元素的位置在末尾的时候,需要注意初始化为0参考代码:#include#include using namespace std; int main() { …… 题解列表 2024年08月31日 0 点赞 0 评论 414 浏览 评分:9.9 « 12...5489549054915492549354945495...59105911 »
判断一年的第几天 摘要:参考代码:#include<stdio.h>struct date { int year; int month; int day;};int main() { struct d…… 题解列表 2024年08月31日 1 点赞 0 评论 388 浏览 评分:9.9
蓝桥杯2023年第十四届省赛真题-冶炼金属 摘要:解题思路:注意事项:参考代码:#include <stdio.h> int main() { int n; scanf("%d",&n); int max=1000000000,min=…… 题解列表 2024年08月31日 0 点赞 0 评论 949 浏览 评分:10.0
1160: 出圈 (vector , 公式法) 摘要:解题思路:Vector注意事项:删除元素的位置在末尾的时候,需要注意初始化为0参考代码:#include#include using namespace std; int main() { …… 题解列表 2024年08月31日 0 点赞 0 评论 414 浏览 评分:9.9