题解列表

筛选

水仙花数判断

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

python不同单词个数统计

摘要:解题思路:set去重注意事项:参考代码:L = list(map(str,input().split()))L = list(set(L))print(len(L))……

自定义函数

摘要:def fact(n): x=1 for i in range(1,n+1): x=x*i return x def mypow(x,n): ……

py最多82分此题

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

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

摘要:解题思路:前缀和、差分的综合使用比如求区间和,在某个区间都加上1,不建议求更新数组后的和使再次使用前缀和求区间和,因为会多几次循环会超时,建议直接元素相乘可以少几次循环即可AC 代码有详细注释注意事项……

IP判断——python

摘要:解题思路:注意事项:参考代码:while True:    try:        L = list(map(str,input().split('.')))        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:       ……

蟠桃记——计算原来的桃子数

摘要:解题思路:逆向思维注意事项:参考代码:while True:    try:        n = int(input())        s = 1        for i in range(n-……