题解列表

筛选

分数统计python

解题思路:写个题解,这么多代码不能白敲了。。。。注意事项:参考代码:n=int(input())a=b=c=d=e=0L1=[]L2=[]L3=[]L4=[]L5=[]L10=list(map(int,input().split()))forminL10:if90<=m<=100:a+=1L1.app

蓝桥杯算法提高VIP-数组替换

解题思路:注意事项:要加L[a+b:]参考代码:m,n=map(int,input().split())L1=list(map(int,input().split()))L2=list(map(int,input().split()))a,b=map(int,

水仙花数判断

摘要:for i in range(1,9):    for j in range(0,9):        for k in range(0,9):            if i*100+j*10+k=……

自定义函数

deffact(n):x=1foriinrange(1,n+1):x=x*ireturnxdefmypow(x,n):m=x**nreturnmx,n=map(eval,input().split())y=[]z=1k=0foriinrange(1,

py最多82分此题

解题思路:注意事项:参考代码:n,m,x=map(int,input().split())a=[0]+list(map(int,input().split()))dp=[0]*100010hash=[0]*100010foriinrange(1,

这题py的测试用例有点问题(已过蓝桥官网)AC

解题思路:前缀和、差分的综合使用比如求区间和,在某个区间都加上1,不建议求更新数组后的和使再次使用前缀和求区间和,因为会多几次循环会超时,建议直接元素相乘可以少几次循环即可AC代码有详细注释注意事项:就是m的输入和数组元素的输入在同一行所以会显示运行错误正常是m在数组元素的下一行参考代码:n=int(

IP判断——python

摘要:解题思路:注意事项:参考代码:while True:    try:        L = list(map(str,input().split(&#39;.&#39;)))        s = 0……

列出最简真分数序列*

摘要:解题思路:注意事项:求余2与求余5要分开来,我也不太清楚为什么不能用or,望有知道的人可以解答一下,谢谢参考代码:L = [i for i in range(1,40)]for i in L:    ……

密码——python

摘要:解题思路:注意事项:参考代码:n = int(input())for i in range(n):    a = str(input())    s = 0    for i in a:       ……