编写题解 2799: 奥运奖牌计数 摘要:解题思路:注意事项:参考代码:n=int(input())jins=yins=tongs=0for i in range(n): list1=list(map(int,input().split…… 题解列表 2024年02月28日 0 点赞 0 评论 337 浏览 评分:0.0
编写题解 2796: 求整数的和与均值 摘要:解题思路:注意事项:可能存在一行输入多个数的情况参考代码:list1 = list(map(int,input().split()))n=list1[0]list1.pop(0)while len(l…… 题解列表 2024年02月28日 0 点赞 0 评论 431 浏览 评分:0.0
进位字符替换 摘要:解题思路:注意事项:参考代码:start, end, w = map(int,input().split())s = list(input())lis = []for i in range(start…… 题解列表 2024年02月28日 0 点赞 0 评论 347 浏览 评分:0.0
字符串分类统计(python正则表达式解) 摘要:解题思路:python正则表达式中re.findall方法全局匹配字符,匹配成功我们得到一个列表,通过len()方法统计列表长度来表示该类字符出现了多少次。注意事项:导入正则表达式re模块通过end=…… 题解列表 2024年02月28日 0 点赞 0 评论 380 浏览 评分:0.0
编写题解 3010: 奇偶数之和 摘要:解题思路:注意事项:参考代码:n=int(input())j=0o=0for i in range(1,n+1): if i%2==0: o+=i else: …… 题解列表 2024年02月28日 0 点赞 0 评论 339 浏览 评分:0.0
###############题解 2855: 简单密码 摘要:解题思路:利用ACSII码的简单粗暴方法注意事项:参考代码:sent = input() for i in range(len(sent)): if ord('F'…… 题解列表 2024年02月28日 0 点赞 0 评论 353 浏览 评分:0.0
########题目2871: 单词倒排问题 摘要:解题思路:将输入内容创建为列表,对列表由后向前遍历,列表的每个元素再按从左向右的顺序输出注意事项:参考代码:lis = list(map(str, input().split())) l = len(…… 题解列表 2024年02月27日 0 点赞 0 评论 356 浏览 评分:0.0
编写题解 3009: 判断闰年 摘要:解题思路:注意事项:参考代码:a=int(input())if (a%4==0)&(a%100!=0): print('Y')elif (a%400==0): print(…… 题解列表 2024年02月27日 0 点赞 0 评论 332 浏览 评分:0.0
编写题解 2792: 三角形判断 摘要:解题思路:两个较短的边之和大于最长的那条边注意事项:参考代码:a=list(map(int,input().split()))a.sort()if a[0]+a[1]>a[2]: print(&…… 题解列表 2024年02月27日 0 点赞 0 评论 417 浏览 评分:10.0
An Easy Problem,非暴力贪心python 摘要:解题思路:用bin()转变为2进制,分两种情况111000和1100111000110,前者增加一位1,后者从后数,遇到第一个01,变为10,并将遇到的1变道最后注意事项:参考代码:def f(n):…… 题解列表 2024年02月27日 0 点赞 0 评论 332 浏览 评分:0.0