[递归]母牛的故事 摘要:解题思路:注意事项:参考代码:while True: n=int(input()) l=[1,2,3] if n==0: break else: f…… 题解列表 2023年02月15日 0 点赞 0 评论 677 浏览 评分:9.0
[编程入门]阶乘求和 摘要:解题思路:注意事项:参考代码:sum=0t=1num=int(input())for i in range(1,num+1): t=t*i sum+=tprint(sum)…… 题解列表 2023年02月15日 0 点赞 0 评论 421 浏览 评分:0.0
蓝桥杯2018年第九届真题-防御力 摘要:解题思路:注意事项:参考代码:n1,n2=map(int,input().split()) lsA=list(map(int,input().split())) copy_lsA=[_ for _…… 题解列表 2023年02月15日 0 点赞 0 评论 613 浏览 评分:9.9
2518: 信息学奥赛一本通T1620-质因数分解 解题思路:注意事项:数学有点差,最开始并没有想到两个不同质数的乘积,能够将它整除出来的只可能是质数。导致时间超时。因为只有两个数,只要求出第一个质数就能够算出另一个质数参考代码:importmathx=int(input())n=int(math.sqrt(x))foriinrange(2, 题解列表 2023年02月15日 0 点赞 0 评论 841 浏览 评分:9.9
Python解决-动态规划 摘要:解题思路:注意事项:参考代码:V = int(input())n = int(input())dp = [0]*(V+1)c = [0]*(n+1)for i in range(1, n+1): …… 题解列表 2023年02月14日 0 点赞 0 评论 526 浏览 评分:0.0
编写题解 1010: [编程入门]利润计算 摘要:解题思路:注意事项:参考代码:I=int(input())if 0<I<=100000: j=I*0.1elif 100000<I<=200000: j=100000*0.1+(I-100…… 题解列表 2023年02月14日 0 点赞 0 评论 938 浏览 评分:0.0
编写题解 1688: 数据结构-字符串插入 解题思路:注意事项:参考代码:a,b,c=input().split()print(a[:int(c)-1]+b+a[int(c)-1:]) 题解列表 2023年02月14日 0 点赞 0 评论 533 浏览 评分:9.9
Python求解背包问题 摘要:解题思路:注意事项:参考代码:n,m=map(int,input().split())w=[0]*(n+1)v=[0]*(n+1)for i in range(1,n+1): w[i],v[i]…… 题解列表 2023年02月14日 0 点赞 0 评论 524 浏览 评分:0.0
2811: 救援(Python) 摘要:解题思路:注意事项:参考代码:from decimal import * n = int(input()) t0 = 0 while True: try: x,y,num=map(in…… 题解列表 2023年02月14日 0 点赞 0 评论 479 浏览 评分:0.0
杨辉三角解题 摘要:解题思路:注意事项:参考代码:while True: try: def tri(row): List = [[1 for i in range(j)] for…… 题解列表 2023年02月13日 0 点赞 0 评论 503 浏览 评分:0.0