Python-自定义函数之数字后移 摘要:解题思路:输入数字个数为n,向后移动m次,可以考虑先将后面m个数插入到列表开头,最后再删去,后面m个数字。注意事项:设置一个while循环,当list长度大于n时,删去最后一个数字,直到长度为n;即使…… 题解列表 2024年05月01日 0 点赞 0 评论 339 浏览 评分:9.9
python语言训练-求s=a+aa+aaa+aaaa+aa...a的值 摘要:解题思路:以字符串输入,强制类型转换注意事项:注意强制类型转换参考代码:a, n = map(str, input().strip().split())s = 0n = int(n)my_list =…… 题解列表 2024年04月30日 0 点赞 0 评论 255 浏览 评分:9.9
编写题解 2906: 笨小猴 摘要:解题思路:注意事项:参考代码:def main(): a = input().strip() # 读取一行输入并去除前后的空白字符 char_counts = {} # 字典来存储每个…… 题解列表 2024年04月30日 0 点赞 0 评论 272 浏览 评分:0.0
python双端队列和set 摘要:解题思路:注意事项:参考代码:from collections import dequedef main(): # 获取用户输入 m, n = map(int, input().split…… 题解列表 2024年04月30日 0 点赞 0 评论 245 浏览 评分:0.0
编写题解 2779: 输出绝对值 摘要:解题思路:float为浮点数函数'%.2f'保留两位数abs为绝对值函数注意事项:参考代码:n = float(input())print('%.2f'%(abs(n)…… 题解列表 2024年04月29日 2 点赞 0 评论 606 浏览 评分:9.0
1063: 二级C语言-统计字符 摘要:解题思路:注意事项:参考代码:s = input() a,b,c,d = 0,0,0,0 for i in s: if i.isalpha(): a += 1 …… 题解列表 2024年04月29日 2 点赞 0 评论 483 浏览 评分:0.0
1013: [编程入门]Sn的公式求和 摘要:解题思路:注意事项:参考代码:n = int(input()) s = 0 for i in range(1, n + 1): temp = '2' * i s…… 题解列表 2024年04月29日 1 点赞 0 评论 384 浏览 评分:10.0
Python利用贡献度法求解 摘要:#### 思路借鉴 利用贡献度法,参考链接https://juejin.cn/post/7350185416652275712 ##### 草稿思路 | left | right | lef…… 题解列表 2024年04月29日 0 点赞 0 评论 224 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:num=[[0]*10]*10 s=int(input()) for i in range(s): num[i]=list(map(int,input().…… 题解列表 2024年04月27日 0 点赞 0 评论 247 浏览 评分:0.0
无聊的星期六 摘要:解题思路:注意事项:参考代码:num=list(map(int,input().split())) num+=list(map(int,input().split())) z=zs=f=0 fo…… 题解列表 2024年04月27日 0 点赞 0 评论 550 浏览 评分:0.0