编写题解 1366: 超级书架2 解题思路:注意事项:参考代码:n,b=map(int,input().split())#奶牛数量与书架高度h_list=[]#存放奶牛身高h=0#初始高度t=0#用了多少头奶牛foriinrange(n):h_list.append(int(input()))h_list.sort(reverse=T 题解列表 2024年03月08日 0 点赞 0 评论 532 浏览 评分:0.0
动态规划-编辑距离 摘要:解题思路:注意事项:a = list(input()) b = list(input()) dp = [[0 for i in range(len(b)+1)]for j in range(len…… 题解列表 2024年03月08日 0 点赞 0 评论 524 浏览 评分:0.0
编写题解 3046: 最小新整数 摘要:解题思路:注意事项:参考代码:def dele(s,k): d=list(str(s))#int类型不能直接转换成list j=0#删除次数 flag=0#是否程序空转(未执行删除操…… 题解列表 2024年03月07日 0 点赞 0 评论 556 浏览 评分:0.0
python编写题解 2773: 计算线段长度 摘要:解题思路:两点间距离公式注意事项:测试数据都是一组,不是两组。参考代码:from math import sqrt number = input().split() if len(number) …… 题解列表 2024年03月07日 3 点赞 4 评论 1279 浏览 评分:9.9
python编写题解 1480: 模拟计算器 摘要:注意事项: 商是整除while True: try: a, b, c = map(str, input().split()) a, b = int(a),…… 题解列表 2024年03月07日 0 点赞 0 评论 531 浏览 评分:0.0
python编写题解 1028: [编程入门]自定义函数求一元二次方程 摘要:解题思路:参考代码:from math import sqrt a, b, c = map(int, input().split()) d = b**2-4*a*c e = sqrt(4*a*c…… 题解列表 2024年03月07日 0 点赞 0 评论 781 浏览 评分:0.0
python编写题解 2793: 点和正方形的关系 摘要:解题思路:求x,y的区间注意事项:判断一个给定的点是否在这个正方形内参考代码:x, y = map(int, input().split()) if x >= -1 and x <= 1 and y…… 题解列表 2024年03月07日 0 点赞 0 评论 1073 浏览 评分:0.0
python编写题解 1039: [编程入门]宏定义之闰年判断 摘要:解题思路:普通年能被4整除且不能被100整除的为闰年,世纪年能被400整除的是闰年参考代码:def LEAP_YEAR(year): if year % 4 == 0 and year % …… 题解列表 2024年03月07日 0 点赞 0 评论 868 浏览 评分:0.0
python编写题解 2792: 三角形判断 摘要:解题思路:三角形的三边关系:任意两边之和大于第三边或者任意两边之差小于第三边。参考代码:a, b, c = map(int, input().split()) if a+b > c and a+c …… 题解列表 2024年03月07日 0 点赞 0 评论 793 浏览 评分:0.0
公共子序列 摘要:解题思路:注意事项:参考代码:def longestCommonSubsequence(X, Y): m, n = len(X), len(Y) dp = [[0] * (n+1) for…… 题解列表 2024年03月07日 0 点赞 0 评论 415 浏览 评分:0.0