求s=a+aa+aaa+aaaa+aa...a的值(两种解法,不懂可私信) 摘要:参考代码:代码一:a,n=map(int,input().split())sum,s=0,0for i in range(n): s=10*s+a sum+=sprint(sum)代码二:…… 题解列表 2021年11月06日 0 点赞 0 评论 561 浏览 评分:6.0
1141: C语言训练-百钱百鸡问题(python) 摘要:解题思路:注意事项:参考代码:price = [5,3,1]s = 0cock = 0hen = 0chicken = 0num = 0for i in range(0,20): cock = …… 题解列表 2021年11月06日 0 点赞 0 评论 523 浏览 评分:0.0
1084: 用筛法求之N内的素数。(python) 摘要:解题思路:注意事项:参考代码:a = int(input())for i in range(2,a+1): for j in range(2,i//2+1): if i == 2:…… 题解列表 2021年11月06日 0 点赞 0 评论 630 浏览 评分:0.0
C语言训练-最大数问题-----详解!!!-----【Python】 摘要:解析:数入一组数中判断是否有-1,将-1前的数放入到列表n中,如果没有-1将循环执行t.extend扩充列表,直到有-1时跳出循环。最后用max函数求出最大值。 ```python t=list(…… 题解列表 2021年11月05日 0 点赞 3 评论 466 浏览 评分:7.3
二级c语言-计负均正--用Python求解----(Python) 摘要:遍历列表统计大于0的个数求平均值小于0的个数 ```python t=list(map(int,input().split())) s=list(map(int,input().split())…… 题解列表 2021年11月05日 0 点赞 0 评论 765 浏览 评分:9.9
二级c语言-偶数求和--用Python求解----(Python) 摘要:第一句输入可以不要,但是提交判断时需要 ```python s=int(input()) t=list(map(int,input().split())) n=0 for i in t: …… 题解列表 2021年11月05日 0 点赞 0 评论 324 浏览 评分:6.0
二级c语言-平均值计算--用Python求解----(Python) 摘要:通过sum函数求和用len计算个数同过for循环遍历判断大于平均值加1 ```python t=list(map(int,input().split())) n=0 avg=sum(t)/le…… 题解列表 2021年11月05日 0 点赞 0 评论 1255 浏览 评分:9.9
1234: 检查一个数是否为质数-题解 摘要:解题思路:注意事项:参考代码:a = int(input())if a <= 1: print("N")elif a == 2: print("Y")else: for i in r…… 题解列表 2021年11月05日 0 点赞 0 评论 1017 浏览 评分:0.0
[编程入门]三个数字的排序------(Python) 摘要:利用Python函数: sort-----对列表进行排序 ```python team=list(map(int,input().split())) team.sort() for i in…… 题解列表 2021年11月05日 0 点赞 0 评论 982 浏览 评分:9.9
[编程入门]数字逆序输出-----详解(Python) 摘要:reverse---可以将列表逆序 ```python team=list(map(int,input().split())) team.reverse() for i in team: …… 题解列表 2021年11月05日 0 点赞 0 评论 786 浏览 评分:9.3