题解列表
蓝桥杯基础练习-数列排序
摘要:n=int(input())if n>=1 and n<=200: sl=list(map(int,input().split())) for i in sorted(sl): ……
编程入门]自定义函数之整数处理
摘要:解题思路:注意事项:参考代码:# 输入10个整数,将其中最小的数与第一个数对换,把最大的数与最后一个数对换。写三个函数;# ①输入10个数;②进行处理;③输出10个数。def a(): a =……
编写题解 1561: 蓝桥杯算法提高VIP-计算质因子(python)
摘要:解题思路:注意事项:参考代码:N = int(input())l = []m = []for i in range(2,N//2+1): if N % i == 0: l.appe……
优质题解
1426: 蓝桥杯历届试题-九宫重排 (双向BFS)用列表做队列实现!(最精简版本)
摘要:双向BFS遍历。
##算法思想:
用BFS的思想,从队列中拿出一种情况作为当前情况进行一次搜寻。在当前的情况下将所有可能的移动(上下左右交换)都检查一次,有意义的情况就将其加入队列,以用来继续下一……
蓝桥杯算法提高VIP-高精度乘法python(三行代码)
摘要:参考代码:x = int(input()) y = int(input()) print(x*y)……
自定义函数之整数处理
摘要:解题思路:注意事项:参考代码:def input_(): a=list(map(int,input().split())) deal(a)def deal(x): x.sort() ……
1481: 蓝桥杯算法提高VIP-剪刀石头布(python)
摘要:解题思路:注意事项:参考代码:a,b=map(int,input().split())if a == b: print("0")elif (a == 0 and b == 2) or (a ==……
编写题解 1115: DNA(python)
摘要:解题思路:注意事项:参考代码:N = int(input())for i in range(N): m,n = map(int,input().split()) a = (m+1) // ……
自定义函数之字符串反转(简单易懂,四行小代码)
摘要:解题思路:n[::-1]就是反序的意思注意事项:注意空格去掉参考代码:n=input()for i in n[::-1]: if i==' ':continue else:……