编写题解 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 评论 394 浏览 评分:0.0
###############题解 2855: 简单密码 摘要:解题思路:利用ACSII码的简单粗暴方法注意事项:参考代码:sent = input() for i in range(len(sent)): if ord('F'…… 题解列表 2024年02月28日 0 点赞 0 评论 440 浏览 评分:0.0
########题目2871: 单词倒排问题 摘要:解题思路:将输入内容创建为列表,对列表由后向前遍历,列表的每个元素再按从左向右的顺序输出注意事项:参考代码:lis = list(map(str, input().split())) l = len(…… 题解列表 2024年02月27日 0 点赞 0 评论 447 浏览 评分: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 评论 416 浏览 评分:0.0
编写题解 2792: 三角形判断 摘要:解题思路:两个较短的边之和大于最长的那条边注意事项:参考代码:a=list(map(int,input().split()))a.sort()if a[0]+a[1]>a[2]: print(&…… 题解列表 2024年02月27日 0 点赞 0 评论 530 浏览 评分:10.0
An Easy Problem,非暴力贪心python 摘要:解题思路:用bin()转变为2进制,分两种情况111000和1100111000110,前者增加一位1,后者从后数,遇到第一个01,变为10,并将遇到的1变道最后注意事项:参考代码:def f(n):…… 题解列表 2024年02月27日 0 点赞 0 评论 407 浏览 评分:0.0
蓝桥杯2023年第十四届省赛真题-阶乘的和 摘要:解题思路:注意事项:参考代码:n = int(input()) a = list(map(int,input().split())) a.sort() from collections impo…… 题解列表 2024年02月27日 0 点赞 0 评论 1085 浏览 评分:8.0
编写题解 2774: 计算三角形面积 摘要:解题思路:注意事项:参考代码:import mathx1,y1,x2,y2,x3,y3=map(float,input().split())a=math.sqrt(math.pow(x1-x2,2)+…… 题解列表 2024年02月26日 0 点赞 0 评论 411 浏览 评分:0.0
1016: [编程入门]水仙花数判断 摘要:for i in range(100, 1000): temp = i num1 = temp % 10 temp //= 10 num2 = temp % 10 tem…… 题解列表 2024年02月26日 0 点赞 0 评论 385 浏览 评分:0.0
编写题解 2772: 苹果和虫子-while循环 摘要:解题思路:注意事项:参考代码:n,x,y=map(int,input().split())while y<(n*x): if y%x==0: print(n-(y//x)) …… 题解列表 2024年02月26日 0 点赞 0 评论 515 浏览 评分:0.0