语法题修剪灌木(三行就够了) 摘要:解题思路:注意事项:参考代码:N = int(input()) for i in range(1,N+1): print(2*(i-1) if i-1>N-i else 2*(N-i))…… 题解列表 2023年10月18日 0 点赞 0 评论 650 浏览 评分:9.9
简单明了计算书费 摘要:解题思路:看代码铁子注意事项:参考代码:a = [28.9,32.7,45.6,78,35,86.2,27.8,43,56,65] #每本书的单价b = list(map(int,i…… 题解列表 2023年10月18日 0 点赞 0 评论 615 浏览 评分:9.9
与指定数字相同的数的个数 解题思路:全在代码里了注意事项:看下面铁汁熬参考代码:N=int(input())a=list(map(int,input().split()))#弄成整形列表m=int(input())#输入一个print(a.count(m))#在a中寻找m的个数 题解列表 2023年10月18日 1 点赞 0 评论 827 浏览 评分:9.9
贪心旅行家的预算 摘要:解题思路: 这和一般的加油问题有不同,一般的加油问题是求最小加油次数,那么它每次在加油站加油都是加满只是应该在哪些个加油站加的问题,它的贪心点在于每一步只考虑当前的油量够不够行驶到下一个加油站,够…… 题解列表 2023年10月18日 0 点赞 0 评论 684 浏览 评分:9.9
先通分,后递归化简,python 摘要:n=int(input())t=[]for x in range(n): t.append(list(map(int,input().split('/'))))m=[]for x…… 题解列表 2023年10月18日 0 点赞 0 评论 502 浏览 评分:0.0
索引来解,dddd 摘要:while True: try: data = input().strip().split() if len(data) == 8: & 题解列表 2023年10月18日 0 点赞 0 评论 447 浏览 评分:9.9
找第一个只出现一次的字符 摘要:解题思路:可用列表将出现一次的字符打包注意事项:打包后,应先判断列表是否为空参考代码:a=input()ls=[]for i in a: if (a.count(i)==1): l…… 题解列表 2023年10月18日 0 点赞 0 评论 471 浏览 评分:0.0
要加EOF,这是满分 摘要:while True: try: line = input().strip() if line == 'END': 题解列表 2023年10月18日 0 点赞 0 评论 520 浏览 评分:9.9
最短的代码 摘要:while True: line = input().strip() if line == '0': break numbers = l…… 题解列表 2023年10月18日 0 点赞 0 评论 526 浏览 评分:7.3
绝对是这道题最短代码,轻松解决 摘要:import math def is_jx(n): return sum(math.factorial(int(digit)) for digit in str(n)) == n jx_…… 题解列表 2023年10月17日 0 点赞 0 评论 664 浏览 评分:9.9