python搜索,开两个数组记录同行同列 摘要: a,b=map(int,input().split()) while a!=-1 and b!=-1: c=[] d=[0 for x in range(a)] e…… 题解列表 2023年10月29日 0 点赞 0 评论 142 浏览 评分:0.0
在原数组中搜索能互质的数---在剩下的数中搜索能互质的数 摘要: n=int(input()) b=list(map(int,input().split())) def gcd(a,b): if a%b == 0: return …… 题解列表 2023年10月28日 0 点赞 0 评论 118 浏览 评分:0.0
深搜,把搜到不同字母记录到数组之中,数组的最大长度就是解 摘要:r,s=map(int,input().split()) b=[] for x in range(r): b.append(list(input())) # print(b) d=[…… 题解列表 2023年10月27日 1 点赞 0 评论 460 浏览 评分:2.0
报时助手Python 摘要:解题思路:注意事项:参考代码:nums = {0:'zero', 1:'one', 2:'two', 3:'three', 4:…… 题解列表 2023年10月27日 0 点赞 0 评论 143 浏览 评分:0.0
信息学奥赛一本通T1616-A的B次方(快速幂) 摘要:```python def f(Base,Index,Num): res=1 while Index!=0: if Index&1: …… 题解列表 2023年10月26日 0 点赞 0 评论 241 浏览 评分:9.9
优质题解 仙之巅,傲世间 摘要:参考代码:n = int(input()) s = int(input()) sumt = [0] sumc = [0] for _ in range(n): t, c = ma…… 题解列表 2023年10月26日 0 点赞 0 评论 351 浏览 评分:9.3
不重复输出的关键是,前面的数比后面的大 摘要:n=int(input())t=ndef rec(n,res): if n<1: if len(res)==1: return for k,x …… 题解列表 2023年10月26日 0 点赞 0 评论 475 浏览 评分:7.3
不容易系列2 摘要:解题思路:注意事项:参考代码:#递归写法def f(x): if x ==1 : return 0 elif x == 2: return 1 else…… 题解列表 2023年10月26日 0 点赞 0 评论 200 浏览 评分:0.0
#问题:分解n (大)-----分解n的二进制(小) 摘要:#问题:分解n (大)-----分解n的二进制(小)def rec(n): for x in range(14,-1,-1): s=n-pow(2,x) if s>0…… 题解列表 2023年10月25日 0 点赞 0 评论 100 浏览 评分:0.0
关键在与看懂集合M的生成是递归生成的 摘要:k,x=map(int,input().split(','))res=0#递归判断x是否在集合m中,不断生成集合m的元素def rec(k,x): global res #…… 题解列表 2023年10月25日 0 点赞 0 评论 203 浏览 评分:0.0