python解题方式 摘要:解题思路:注意事项:参考代码:a = []while len(a) < 12: a.append(float(input()))b = sum(a)/12print('$%.2f'…… 题解列表 2024年09月05日 1 点赞 0 评论 720 浏览 评分:10.0
python--study||O.o 摘要:参考代码: def main(): n = int(input()) t = dict() mx = -1 for i in range(n): &nb 题解列表 2024年09月02日 0 点赞 0 评论 359 浏览 评分:10.0
python--study||O.o 摘要:参考代码: def main(): n = int(input()) arr = [int(x) for x in input().split()] find = in…… 题解列表 2024年09月02日 0 点赞 0 评论 314 浏览 评分:10.0
1197: 发工资咯(贪心算法) 摘要:核心:票票从大开始扣,数量是最少的代码:while True: l = [int(x) for x in input().split()] n = l[0] if n =…… 题解列表 2024年08月30日 0 点赞 0 评论 376 浏览 评分:0.0
1198: 取石子游戏 摘要:核心: 威佐夫博弈 a == (int)((b - a) * ((sqrt(5) + 1) / 2)):先手输,其他则先手赢代码:from math import sqrt while T…… 题解列表 2024年08月30日 0 点赞 0 评论 251 浏览 评分:0.0
1190: 剔除相关数 摘要:核心:就挺难说的,暴力求解吧代码:def func(l): c = [] l1 = [0] * len(l) res = [] for i in range(l…… 题解列表 2024年08月29日 0 点赞 0 评论 246 浏览 评分:0.0
1282: 公交汽车(动态规划) 摘要:核心:动态规划,dp数组代码:cost = [int(x) for x in input().split()] n = int(input()) dp = [0] * n # dp[i]物品(站…… 题解列表 2024年08月22日 0 点赞 0 评论 313 浏览 评分:0.0
能量项链(找规律) 摘要:核心:找规律,最后一个数*(列表中依次两两相乘之和),不过最后两个数得分情况代码:自己的算法: n = int(input()) l = [int(x) for x in input().spli…… 题解列表 2024年08月22日 0 点赞 2 评论 366 浏览 评分:6.0
2331: 信息学奥赛一本通T1180-分数线划定 摘要:解题思路:注意事项:参考代码:看到还是没有这道题的python代码讲解,就把很久之前写的一个代码放上来,希望可以帮到需要的人。import math a,b=map(int,input().spli…… 题解列表 2024年08月21日 0 点赞 0 评论 329 浏览 评分:0.0
1177: 三角形(动态规划) 摘要:核心:利用动态规划的思想,从下向上求解最大路径和代码:"""动态规划""" T = int(input()) for i in range(T): n = int(input()) …… 题解列表 2024年08月21日 0 点赞 0 评论 249 浏览 评分:0.0