1221: 数列问题 摘要: n=int(input()) f=[0]*(n+1) f[1]=3 f[2]=4 f[3]=5 for i in range(4,n+1): …… 题解列表 2021年10月12日 0 点赞 0 评论 388 浏览 评分:0.0
题解-斐波纳契数列 摘要:解题思路:根据f[i]=f[i-1]+f[i-2]规律不断迭代 注意事项:初始条件,n=1需要单独考虑 参考代码: n=int(input()) f=[0]*n if n==1: …… 题解列表 2021年10月12日 0 点赞 0 评论 532 浏览 评分:0.0
sor[1503]:前10名排序(Python) 2行代码,不能再少了,因为要处理第1行的数字 摘要:解题思路:接收输入,接收第2行输入,处理输入数据,map一下,list一下,排个序,再逆转,再列个表,切片一下,for循环打印输出。OK了注意事项:参考代码:别废话了,上代码吧n=int(input(…… 题解列表 2021年10月11日 0 点赞 1 评论 463 浏览 评分:9.3
题目 1052: [编程入门]链表合并 摘要:解题思路:注意事项:在线编程通过了,测试提交出错了,有hxd提点建议吗参考代码:n,m = map(int,input().split())l = []for i in range((n+m)): …… 题解列表 2021年10月10日 0 点赞 1 评论 338 浏览 评分:2.0
[1023]:选择排序(Python) 一句话就AC的代码,听说Python都喜欢代码少一些 摘要:解题思路:一句话就AC的代码,听说Python都喜欢代码少一些注意事项:没啥可注意的事项,总共连空格和标点才60个字符,注意啥啊?嗯,有个事要注意,下面就放图了:___________________…… 题解列表 2021年10月10日 0 点赞 2 评论 866 浏览 评分:6.6
[编程入门]猴子吃桃的问题(python题解) 摘要:解题思路:有脑往前推注意事项:注意循环起止的取值参考代码:peach = 1 N = int(input()) for i in range(N-1,0,-1): peach = (pe…… 题解列表 2021年10月07日 0 点赞 0 评论 668 浏览 评分:7.3
求和训练题解 摘要:解题思路:注意事项:参考代码:a,b,c=map(int,input().split())alist=[int(x) for x in range(1,a+1)]blist=[int(x)*int(x…… 题解列表 2021年10月04日 0 点赞 0 评论 806 浏览 评分:0.0
水仙花数题解 摘要:解题思路:注意事项:参考代码:for i in range(100,1000): s=0 astr=str(i) for j in astr: x=int(j) …… 题解列表 2021年10月04日 0 点赞 0 评论 394 浏览 评分:9.0
亲密数题解 摘要:解题思路:注意事项:参考代码:for i in range(1,3000): s=k=0 for j in range(1,i): if i%j==0: …… 题解列表 2021年10月03日 0 点赞 4 评论 782 浏览 评分:8.8
三个数字排序题解 摘要:解题思路:注意事项:参考代码:list=[int(a) for a in input().split()]list.sort()for i in list: print(i,end=" ")…… 题解列表 2021年10月02日 0 点赞 0 评论 663 浏览 评分:0.0