要加EOF,这是满分 摘要:while True: try: line = input().strip() if line == 'END': 题解列表 2023年10月18日 0 点赞 0 评论 323 浏览 评分:9.9
最短的代码 摘要:while True: line = input().strip() if line == '0': break numbers = l…… 题解列表 2023年10月18日 0 点赞 0 评论 285 浏览 评分: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 评论 481 浏览 评分:9.9
我来告诉你高手怎么解题 摘要:from itertools import permutations options = [7, 6, 5, 4, 3, 2, 1] for perm in permutations(option…… 题解列表 2023年10月17日 0 点赞 0 评论 442 浏览 评分:9.9
字符串距离:一种典型动态规划 摘要:解题思路:在这个题目中,要求求两个字符串之间的最小距离,在初始化字符串的时候先分别考虑两个字符串为空的情况,当其中一个为空时,另外一个字符串对应的每一个字符的位置上都是加k(空字符与任意字符的距离),…… 题解列表 2023年10月17日 0 点赞 0 评论 403 浏览 评分:9.9
温度转换Python 摘要:解题思路:注意事项:参考代码:F=float(input())c=5*(F-32)/9print("c=%.2f"%c)…… 题解列表 2023年10月17日 1 点赞 0 评论 785 浏览 评分:0.0
天才的两种解法 摘要:while True: try: # 从输入中读取一个6位的正整数,表示金币的总重量 k = int(input()) - 265716 # 减去初始值…… 题解列表 2023年10月17日 0 点赞 0 评论 329 浏览 评分:9.9
贪心盾神与积木游戏(超时有点烦) 摘要:解题思路: 贪心点:先帮差值最小的完成积木作品注意事项:参考代码:# 时间超限: 64 分 运行时间: 6803ms m = int(input()) for _ in …… 题解列表 2023年10月16日 0 点赞 0 评论 211 浏览 评分:9.9
欣赏天才之作 摘要:import math def find_defective_ball(N): k = math.ceil(math.log(N, 3)) return k while Tru…… 题解列表 2023年10月16日 1 点赞 0 评论 594 浏览 评分:9.9
暴力寂寞的数 摘要:解题思路:想太多思维容易一坨,还是暴力吧。。注意事项:参考代码:def d(num): temp = [int(i) for i in str(num)] return num +…… 题解列表 2023年10月16日 0 点赞 0 评论 236 浏览 评分:9.9