题解列表
2684: 蓝桥杯2022年第十三届省赛真题-数位排序
摘要:解题思路:会用sorted函数+匿名函数注意事项:参考了别人的题解,我自己再写一遍参考代码:n = int(input())
m = int(input())
s = [i for i in ra……
蓝桥杯基础练习VIP-Huffuman树
摘要:解题思路:注意事项:参考代码:n = int(input())L = list(map(int,input().split()))L2 = []while len(L)>1: L1 = sort……
python,简单明了,清晰易懂。
摘要:解题思路:注意事项:参考代码:n = int(input())for i in range(1, n + 1): if i < (n + 1) // 2 + 1 : print( ……
2591: 蓝桥杯2020年第十一届省赛真题-成绩统计
摘要:n=int(input())lst=[]yx,jg=0,0def sishewuru(renshu,n): origal=renshu*100/n quzheng=int(origal) ……
蓝桥杯2014年第五届真题-分糖果
摘要:解题思路:注意事项:参考代码:def hs(L): for i in L: if i%2: return 1 else: ……
2680: 蓝桥杯2022年第十三届省赛真题-纸张尺寸
摘要:解题思路:只用考虑输入的0~9这几个数,做循环就行注意事项:参考代码:name = input()
num = int(name[1]) #只看A后面的数
l=1189 #长
w=8……
用二分减少一次for循环
摘要:解题思路:注意事项:参考代码:n=int(input())a=[0]+list(map(int,input().split()))b=[0]+list(map(int,input().split())……
蓝桥杯算法提高VIP-质因数2
摘要:解题思路:用while跳过质数判断注意事项:参考代码:n = int(input())s = str(n)+'='lis = []for i in range(2, n+1): ……
一定要尽可能小的开列表,不然这题很容易爆内存
摘要:解题思路:注意事项:参考代码:n,k=map(int,input().split())a=[0]+list(map(int,input().split()))st=[[0 for _ in range……