题解列表

筛选

转换成字符串做

摘要:解题思路:注意事项:最开始list里面的都是字符,用sort的时候记得转换成数字哈参考代码:n = int(input())list0=[]for i in range(100,1000):    n……

第十四届省赛真题填充

摘要:解题思路:注意事项:s=input() l=len(s) i=0 ss=["11","00","?1","?0","0?","1?","??"] c=0 while i<l-1:     ……

天才的写法

摘要:解题思路:注意事项:参考代码:while True:    try:        array = list(map(int, input().split()))        array_odd =……

计算书费元组方法

摘要:解题思路:注意事项:参考代码:prices=[28.9,32.7,45.6,78,35,86.2,27.8,43,56,65]counts=list(map(int,input().strip().s……

用字典循环一次解决

摘要:解题思路:因为需要每一个元素都为n/10,我们只需要先找到代价大的放入字典,且满足次数为n/10,只改变剩余的元素,代价之和就是最小的。注意事项:参考代码:n=int(input())a=[tuple……

编写题解 1366: 超级书架2

摘要:解题思路:注意事项:参考代码:n,b=map(int,input().split())#奶牛数量与书架高度h_list=[]#存放奶牛身高h=0#初始高度t=0#用了多少头奶牛for i in ran……

动态规划-编辑距离

摘要:解题思路:注意事项:a = list(input()) b = list(input()) dp = [[0 for i in range(len(b)+1)]for j in range(len……