数组插入处理,容易理解 摘要:解题思路:注意事项:参考代码:l=list(map(int,input().split())) #map做映射,split是分隔符,l是原始数列组成的列表n=int(input()) #n是要插入的数…… 题解列表 2023年04月04日 0 点赞 0 评论 365 浏览 评分:0.0
第一个pyAC 五行秒杀 摘要:解题思路:注意事项:参考代码:n=int(input())while len(str(n))!=1: x=sum(list(map(int,str(n)))) n=x…… 题解列表 2023年04月03日 0 点赞 0 评论 376 浏览 评分:0.0
纯签到题,str.count直接秒了 摘要:解题思路:注意事项:参考代码:n=int(input())cnt=0for i in range(1,n+1): t=str(i) if t.count('2')>0 or…… 题解列表 2023年04月03日 0 点赞 0 评论 384 浏览 评分:0.0
datetime判断日期合理性即可 摘要:解题思路:注意事项:参考代码:from datetime import datetimedef isValidTime(y,m,d): try: t=datetime(y,m,d)…… 题解列表 2023年04月03日 0 点赞 0 评论 407 浏览 评分:0.0
利用列表内置函数解决 摘要:解题思路:利用list函数count注意事项:参考代码:times = int(input())s = []for i in range(times): s += [j for j in map…… 题解列表 2023年04月03日 0 点赞 0 评论 363 浏览 评分:0.0
逆序数——python 摘要:解题思路:注意事项:参考代码:n = int(input())L = list(map(int,input().split()))s = 0while len(L)>1: a = L[0] …… 题解列表 2023年04月03日 0 点赞 0 评论 349 浏览 评分:0.0
Fibonacci数列——递归 摘要:解题思路:注意事项:参考代码:def fb(n): if n == 1 or n == 2: return 1 else: return fb(n-1)+fb(…… 题解列表 2023年04月03日 0 点赞 0 评论 429 浏览 评分:9.9
寻找三位数 摘要:解题思路:注意事项:参考代码:for i in range(100,334): a = 2*i b = 3*i if len(set(str(a)+str(b)+str(i))) =…… 题解列表 2023年04月03日 0 点赞 0 评论 436 浏览 评分:0.0
以b数组当中间值,二分解决 摘要:解题思路:注意事项:参考代码:n=int(input())a=[0]+list(map(int,input().split()))b=[0]+list(map(int,input().split())…… 题解列表 2023年04月03日 0 点赞 0 评论 351 浏览 评分:0.0
矩阵对角线求和 摘要:解题思路:注意事项:参考代码:a = list(map(int,input().split()))b = list(map(int,input().split()))c = list(map(int,…… 题解列表 2023年04月03日 0 点赞 0 评论 327 浏览 评分:0.0