按递增顺序依次列出所有分母为40,分子小于40的最简分数。 摘要:解题思路: 分母不变,分子在增加。最简分数就是分子分母不能继续化简。这句话隐含的意思就是(分子分母不能有公因数)。分母不变,分子在增加,所以需要用到循环,使分子从1-40依次递增。然后仅保留出与…… 题解列表 2023年08月16日 0 点赞 0 评论 297 浏览 评分:0.0
自定义函数之字符串连接(指针) 摘要:解题思路: 解释就都在代码中了 参考代码: 未用指针版,容易理解些: ```c #include void m(char *a,char *b) { int i=0,k…… 题解列表 2023年08月16日 0 点赞 0 评论 287 浏览 评分:0.0
比较简洁的一种写法,简单易懂 摘要:#include<stdio.h> #include<stdlib.h> typedef struct Node{ int data; struct Node* next; …… 题解列表 2023年08月16日 0 点赞 0 评论 187 浏览 评分:0.0
题解 1866: 三位数反转(C代码) 摘要:解题思路:注意审题,输出3个整数(看着是n的倒叙数,但是并不是,而是3个整数挨着)注意事项:加题干中的判断条件,注意只要输入有效就可以一直输出,而不是只能输入一次用while (~scanf("%d"…… 题解列表 2023年08月16日 0 点赞 0 评论 298 浏览 评分:0.0
题解 2853字符替换 摘要:解题思路:注意事项:要看输入格式要求,一口气输入就要一口气输入 字符串和字符的输入输出方式参考代码:#include<stdio.h>#include<string.h>int main(){ …… 题解列表 2023年08月16日 0 点赞 0 评论 312 浏览 评分:0.0
题解 2773: 计算线段长度--C 摘要:解题思路:double注意事项:参考代码:#include<stdio.h>#include <math.h>int main(){ double x1, y1, x2, y2; doub…… 题解列表 2023年08月16日 0 点赞 0 评论 254 浏览 评分:0.0
奥运奖牌计数,加油 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){int a, b, c, n,sum=0;int d=0, e=0, f=0;int i;scanf("%d", …… 题解列表 2023年08月17日 0 点赞 0 评论 219 浏览 评分:0.0
蓝桥杯算法训练-大小写转换 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int main(){ char s[10000]; gets(s); for(i…… 题解列表 2023年08月17日 0 点赞 0 评论 214 浏览 评分:0.0
调试了一上午。。一定记得循环完一趟更新头节点、更新删除的位置 摘要:#include#includetypedef struct Node{ int id; int score; struct Node* next; }Node; v…… 题解列表 2023年08月17日 0 点赞 0 评论 265 浏览 评分:0.0
123123sfaasfsfa 摘要:#include<stdio.h> #include<stdlib.h> typedef struct Node{ int data; struct Node* next; …… 题解列表 2023年08月17日 0 点赞 0 评论 297 浏览 评分:0.0