题解列表

筛选

求s=a+aa+aaa+aaaa+aa...a的值

摘要:解题思路:注意事项:参考代码:a,n=map(int,input().split())a=str(a)s=[]S=0for i in range(n):    s.append(a*(i+1))   ……

最大配对——python

摘要:解题思路:注意事项:参考代码:n = int(input())L1 = list(map(int,input().split()))L2 = list(map(int,input().split())……

阶乘末尾的K位

摘要:解题思路:注意事项:参考代码:from math import*n,k = map(int,input().split())a = str(factorial(n))while a.endswith(……

超级楼梯——递归

摘要:解题思路:注意事项:参考代码:def pa(n):    if n == 1 or n == 2:        return n    else:        return pa(n-1)+pa(……

统计字母个数

摘要:解题思路:注意事项:参考代码:L = list(input())while '#'not in L:    L.extend(input())for i in range(ord(&#……

巧用集合,迅速秒杀

摘要:解题思路:利用python中的集合解决注意事项:输入时使用map函数参考代码:n=int(input())a=list(map(int,input().split()))b=set()b.add(0)……