【Python题解】姜太公钓鱼 摘要:参考代码:n = int(input()) lis = list(map(int, input().split())) count = 0 for i in lis: if i <= …… 题解列表 2023年01月14日 0 点赞 0 评论 513 浏览 评分:9.9
[编程入门]成绩评定 摘要:解题思路:注意事项:参考代码:x=int(input())if x>=0 and x<60: print("E")elif x>=60 and x<70: print("D")elif x…… 题解列表 2023年01月14日 1 点赞 2 评论 1783 浏览 评分:9.9
1019: [编程入门]自由下落的距离计算-简单易懂 ```**m,n=map(int,input().strip().split())#m米n次时sum=m#直接下落的初始化距离foriinrange(1,n+1):m=m/2#n次落地时反弹m高sum+=2*m#共经过sum米ans=sum-2*mprint("%.2lf"%m, 题解列表 2023年01月13日 0 点赞 0 评论 539 浏览 评分:8.0
归并排序求逆序对个数 摘要:解题思路:主要思想是归并排序,分为三种情况:①逆序数全部在左侧②逆序数全部在右侧③逆序数位于左右两侧参考代码:def merge_sort(li): if len(li) <= 1: …… 题解列表 2023年01月13日 0 点赞 0 评论 552 浏览 评分:9.9
归并排序python解法 摘要:参考代码:def merge_sort(li): #数组长度不超过两个则不需要排序,直接返回 if len(li) <= 1: return mid=len(li)//…… 题解列表 2023年01月13日 0 点赞 0 评论 644 浏览 评分:9.9
求和训练(python) 摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().strip().split())e,r,t=0,0,0for i in range(1,a+1): e+=i for…… 题解列表 2023年01月12日 0 点赞 0 评论 937 浏览 评分:9.9
快速排序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 评论 550 浏览 评分:9.9
1074基础解法(Python) 摘要:注意事项:sys.stdin会读取到'\n'换行符参考代码:import sysfor line in sys.stdin : if int(line) == 0 : …… 题解列表 2023年01月12日 0 点赞 0 评论 627 浏览 评分: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 评论 987 浏览 评分:9.6
数字整除(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 评论 396 浏览 评分:0.0