题解列表
2685: 蓝桥杯2022年第十三届省赛真题-蜂巢
摘要:解题思路:建立新的坐标系,转换坐标,判断距离图中坐标只是表示每个六边形的相对位置,不要理解成几何中心的平面坐标!注意事项:关键在于如何建一个坐标系使得方便判断距离参考代码:d1,p1,q1,d2,p2……
密码截获——python
摘要:解题思路:注意事项:参考代码:while True: try: L = input() L2 = [] if len(L) == 1: ……
数组插入处理,容易理解
摘要:解题思路:注意事项:参考代码:l=list(map(int,input().split())) #map做映射,split是分隔符,l是原始数列组成的列表n=int(input()) #n是要插入的数……
第一个pyAC 五行秒杀
摘要:解题思路:注意事项:参考代码:n=int(input())while len(str(n))!=1:
x=sum(list(map(int,str(n))))
n=x……
纯签到题,str.count直接秒了
摘要:解题思路:注意事项:参考代码:n=int(input())cnt=0for i in range(1,n+1): t=str(i) if t.count('2')>0 or……
datetime判断日期合理性即可
摘要:解题思路:注意事项:参考代码:from datetime import datetimedef isValidTime(y,m,d): try: t=datetime(y,m,d)……
利用列表内置函数解决
摘要:解题思路:利用list函数count注意事项:参考代码:times = int(input())s = []for i in range(times): s += [j for j in map……