快速排序python解法 摘要:参考代码:def quick_sort(q, l, r): if l>=r: return i, j = l-1, r+1 x = q[(l+r)//2] while i < j: …… 题解列表 2023年01月12日 0 点赞 0 评论 562 浏览 评分:9.9
选择排序思想解题 摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>#include<windows.h>int main(){ int l,m,min; …… 题解列表 2023年01月12日 0 点赞 0 评论 504 浏览 评分:0.0
1074基础解法(Python) 摘要:注意事项:sys.stdin会读取到'\n'换行符参考代码:import sysfor line in sys.stdin : if int(line) == 0 : …… 题解列表 2023年01月12日 0 点赞 0 评论 644 浏览 评分:9.9
输出最高分数的学生姓名 摘要:解题思路:注意事项:参考代码:#include<stdio.h>struct student{ int score; char name[100];}a[1000];int main(){…… 题解列表 2023年01月12日 0 点赞 0 评论 457 浏览 评分:0.0
The 3n + 1 problem(水题) ```c#includeintfun(intn){intcnt=0;do{if(n%2==0){n/=2;cnt++;}else{n=n*3+1;cnt++;}}while(n!=1);returncnt+1;}intmain(){inti, 题解列表 2023年01月12日 0 点赞 0 评论 574 浏览 评分:9.9
简单易懂的水仙花(三行python) 摘要:解题思路:一看就会注意事项:一看就会参考代码:for i in range(100,1000): if i==(i//100)**3+(i//10%10)**3+(i%10)**3: …… 题解列表 2023年01月12日 0 点赞 0 评论 1010 浏览 评分:9.6
电池的寿命 思路:对于有1个3,1个5的情况和3,5各有奇数个的情况没得说,对于其他情况把电池当作水即可求得。参考代码为初始未优化代码,大家可以自己更近一步修改。参考代码:```c#includeintmain(){intN;while(scanf("%d", 题解列表 2023年01月12日 0 点赞 0 评论 1006 浏览 评分:7.3
题目 1511: 蓝桥杯算法提高VIP-复数求和 摘要:解题思路:从键盘读入n个复数(实部和虚部都为整数)用链表存储,遍历链表求出n个复数的和并输出。注意事项:参考代码:#include<stdio.h>#include<stdlib.h>typedef …… 题解列表 2023年01月12日 0 点赞 0 评论 536 浏览 评分:0.0
数字整除(python代码) 摘要:def judge(x): c = len(x) x = list(x) e = int(x[c-1]) del(x[c-1]) x = '& 题解列表 2023年01月12日 0 点赞 0 评论 415 浏览 评分:0.0
奇偶数判断(C语言) 摘要:解题思路:从文章的‘输出格式’可以知道:如果输入的数是奇数,就输出odd,如果是偶数就输出even。一个大于0的正整数,非偶即奇。一个数除以2,没有余数的就是偶数,有余数的就是奇数。注意事项:1.输入…… 题解列表 2023年01月12日 0 点赞 0 评论 904 浏览 评分:6.0