题解列表

筛选

8行:帅破天际

摘要:解题思路:注意事项:参考代码:wlb=[]for i in range(5):    row=input()    wlb.append(row)n,m=map(int,input().split()……

2820: 含k个3的数

摘要:解题思路:注意事项:参考代码:a,b = map(int,input().split())c = 0for i in str(a):    if i == '3':        c ……

2819: 数字反转

摘要:解题思路:注意事项:参考代码:n = int(input())if n >= 0:    s = str(n)[::-1]    print(int(s))else:    n = -n    s =……

2817: 级数求和

摘要:解题思路:注意事项:参考代码:k = int(input())s = 0n = 0while k >= s:    n += 1    s += 1/nprint(n)……

统计满足条件的4位数个数

摘要:解题思路:注意事项:参考代码:n = int(input())l = list(map(int,input().split()))count = 0for i in l:    a = i%10   ……

题解 2815: 求特殊自然数

摘要:解题思路:注意事项:参考代码:def switch_n(n,d):    l = []    while n > 0:        l.append(str(n % d))        n = n……

题解 2814: 正常血压

摘要:解题思路:注意事项:参考代码:n = int(input())c = 0max = 0while n:    a,b = map(int,input().split())    if 90 <= a ……

题解 2813: 药房管理

摘要:解题思路:注意事项:参考代码:m = int(input())n = int(input())t = list(map(int,input().split()))w = 0c = 0for i in ……

优质题解,有解析

摘要:解题思路:为了解决这个问题,我们需要构建一个图,其中节点是点,边是两点之间的连线,边的权重是两点之间的直线距离。由于我们需要找到从源点到目标点的最短路径,我们可以使用Dijkstra算法(适用于有权图……