弟弟的作业——判断算式是否正确 摘要:解题思路:参考了其他作者的代码,利用‘==’,判断算式是否成立注意事项:参考代码:def check(L): if '?' in L: return 0 el…… 题解列表 2023年03月17日 0 点赞 0 评论 206 浏览 评分:0.0
蓝桥杯专题系列-2311(Python) 摘要:解题思路:多调试代码参考代码:n = int(input())lst = [1, 1, 2]if n == 1 : print('1.00000000')elif n == 2 …… 题解列表 2023年03月16日 0 点赞 0 评论 216 浏览 评分:0.0
编写题解 1015: [编程入门]求和训练 摘要:参考代码:m = list(map(int, input().split(" "))) s = 0 for i in range(1, m[0]+1): s += i for i in…… 题解列表 2023年03月16日 0 点赞 0 评论 288 浏览 评分:9.9
巧用字典get方法 摘要:解题思路:注意事项:参考代码:s=input()t=dict()c=set()a=''for i in range(len(s)): t[s[i]]=t.get(s[i],0)+…… 题解列表 2023年03月16日 0 点赞 0 评论 237 浏览 评分:0.0
编写题解 1003: [编程入门]密码破译 摘要:python参考代码:用列表:s = input()m = []for i in s: m.append(chr(ord(i)+4))print("".join(m))用字符串:s = inpu…… 题解列表 2023年03月16日 2 点赞 0 评论 1097 浏览 评分:9.9
Python 深度优先算法(DFS) 摘要:解题思路:注意事项:参考代码:n,r = map(int,input().strip().split()) nums = [i for i in range(1,n+1)] result = []…… 题解列表 2023年03月16日 0 点赞 0 评论 367 浏览 评分:6.0
蓝桥杯专题系列-1097(Python) 摘要:解题思路:总体思路是找规律注意事项:做好数据类型的转换处理即可参考代码:n = int(input())dp = [[0 for i in range(n)] for i in range(n)]a …… 题解列表 2023年03月16日 0 点赞 0 评论 200 浏览 评分:0.0
求最小公倍数-python 使用Counter计数 摘要:解题思路:求出每个数的所有质因数,对于每个数分别用Counter类记录每个质因数的个数,最后将三个Counter取并集,求得最小公倍数注意事项:Counter的具体用法可以参考https://zhua…… 题解列表 2023年03月16日 0 点赞 0 评论 219 浏览 评分:9.9
矩阵快速幂-python(最后一个运行超时) 摘要:解题思路:注意事项:参考代码:n,m,p = map(int,input().split())# 定义快速幂,k为取模的时候使用def fp(base, power:int, k=float('…… 题解列表 2023年03月16日 0 点赞 0 评论 442 浏览 评分:9.9
超级简单,来理解一下吧 摘要:解题思路:见代码注意事项:用for循环将数据压入链表中,不能得到满分。参考代码:n = int(input()) sum = 0 a = list() while len(a) < n: # …… 题解列表 2023年03月16日 0 点赞 0 评论 866 浏览 评分:9.9