1123: C语言训练-列出最简真分数序列* 摘要:解题思路:40的因子包括:1,2,4,5,8,10,20;其中的素数包括:2,5;只需循环判断:作为分子的数是否能被2或5整除即可;不能整除即输出该数;注意事项:无参考代码:#include<stdi…… 题解列表 2022年01月19日 0 点赞 0 评论 230 浏览 评分:0.0
[无聊君]蓝桥杯历届试题-九宫重排 简单题解,一次就过 摘要:解题思路:一道简单的BFS(广度优先搜索)题目,套模板可直接解题与输入地图的题目一样,只是将地图的位移数组上 -1,0下 1,0左 0,-1右 0,1改为在字符串中模拟地图位移数组上 -3下 3左 -…… 题解列表 2022年01月19日 0 点赞 3 评论 775 浏览 评分:9.9
学好英语走遍天下(但不能忘本) 摘要:解题思路:我们可以发现一句英文是由三部分组成(单词,空格,标点符号)然后我们可以发现每两个单词中间就有一个空格,那么我们只要对接收到的字符串,统计它中空格的数量,那么单词数量就是空格数量加1。注意事项…… 题解列表 2022年01月19日 0 点赞 0 评论 288 浏览 评分:9.9
奖学金,运用sort函数对结构体类型排序 摘要:解题思路: 结构体类型排序,运用sort函数 注意事项: 自定义比较方法:bool cmp(struct Student &a, struct Student &b) 小于5人,则全部输出 …… 题解列表 2022年01月19日 0 点赞 0 评论 341 浏览 评分:8.7
1122: C语言训练-亲密数 摘要:解题思路:依次循环3000以内的数;先求A的全部因子之和,并赋值给B,再判断B的全部因子之和是否等于A,且需要判断B>A(实现小的在前);注意事项:需要判断B>A,以实现小的在前;参考代码:#incl…… 题解列表 2022年01月19日 0 点赞 0 评论 371 浏览 评分:0.0
奖学金,运用sort函数对结构体类型排序 摘要:解题思路:结构体类型排序,运用sort函数注意事项:自定义比较方法:bool cmp(struct Student &a, struct Student &b)小于5人,则全部输出参考代码:#incl…… 题解列表 2022年01月19日 0 点赞 0 评论 476 浏览 评分:9.9
指针应用,注意虽然是冒泡,但是指针交换值与数组还是有差别 摘要:#include#include#includetypedef struct stu{ int sno; int grade; }STU,*stu; int main(){ int n…… 题解列表 2022年01月19日 0 点赞 0 评论 154 浏览 评分:0.0
不向自定义数组的大小 摘要:#include<stdio.h> #include<string.h> #include<malloc.h> int main(){ int n,m; int status=s…… 题解列表 2022年01月19日 0 点赞 0 评论 131 浏览 评分:0.0
通过单链表删除,省的数组太大,导致循环多次.莫名其妙的char* 摘要:#include<stdio.h> #include<string.h> #include<malloc.h> typedef struct Node{ int c; s…… 题解列表 2022年01月19日 0 点赞 0 评论 143 浏览 评分:0.0
不如链表好,太多判断, 摘要:#include<stdio.h> #include<string.h> #include<malloc.h> int main(){ int n; int status=sca…… 题解列表 2022年01月19日 0 点赞 0 评论 187 浏览 评分:9.9