题解列表

筛选

1275:吹哨传球

摘要:```python n, m = map(int, input().split()) def C(x, y): a1 = 1 for i in range(1, y+1):……

1184基础解法(Python)

摘要:解题思路:把set,list,dict类型都用上,巧用各个数据类型之间的联系以及优势解决问题注意事项:注意sorted()的用法参考代码:n = int(input())lst = []dic = {……

1115基础解法(Python)

摘要:解题思路:找规律即可注意事项:print()只换一行但是print('\n')会换二行,注意这点否则会格式错误参考代码:n = int(input())for count in ran……

编写题解 1395: 倒数第二 Python

摘要:解题思路:sort函数注意事项:很简单好吧,不需要注意参考代码:C=int(input())while C!=0:    n=int(input())    if n>=2 and n<=10:   ……

多重背包问题 python题解

摘要:n,m=map(int,input().split())W=[]V=[]#转化为01背包问题,同时减少重复的数据,降低时间复杂度for i in range(n):    a,b,c=map(int,……

巧用数组和字符串来解题

摘要:解题思路:就是简单的字符串和数组的使用注意事项:没啥要注意的参考代码:n=list(input().split( )) str=str(n[0]) n=int(n[1]) sum=0 for ……

1133库函数解法(Python)

摘要:解题思路:Python的魅力就是库函数的多样性和强大性注意事项:math.factorial(i)即返回i的阶乘值参考代码:import mathn = int(input())summary = 0……