题解列表

筛选

编写题解 2837: 年龄与疾病

摘要:解题思路:1)定义4个count计数器2)输出%:'%.2f%%'%n注意事项:参考代码:n=int(input()) #病人数目 ages=list(map(int,input()……

编写题解 2836: 数组逆序重放

摘要:解题思路:逆序:nums[::-1]注意事项:参考代码:n=int(input()) nums=list(map(int,input().split())) #打包为整型数组 for i in n……

编写题解 2835: 计算书费

摘要:解题思路:注意事项:参考代码:price=[28.9,32.7,45.6,78,35,86.2,27.8,43,56,65] #将价格储存进数组 nums=list(map(int,input().……

编写题解 1098: 陶陶摘苹果

摘要:解题思路:定义count指针计数注意事项:参考代码:h1=list(map(int,input().split())) #苹果到地面高度,打包为整型数组 h2=int(input()) #陶陶把手伸……

编写题解 2797: 最高的分数

摘要:解题思路:注意事项:参考代码:n=int(input()) grades=list(map(int,input().split())) #将成绩打包为整型数组 max=grades[0] for……

蓝桥杯算法训练VIP-整数平均值

摘要:解题思路:注意事项:注意看题目样例输出,要用整除。参考代码:n=int(input()) #元素个数 ls=list(map(int,input().split())) #将输入的元素打包为整型数组……

关键处只有一行代码

摘要:解题思路:根据老板可以借水,可以变相理解为使用2个空瓶和老板换一瓶水,代码改写为参考代码:while 1:    t=int(input())    if t == 0:        break  ……

斜率计算——python简单解法

摘要:解题思路:数学问题,y坐标之差除以x坐标之差注意事项:直线垂直于x轴的时候,斜率不存在参考代码:x1,y1=map(int,input().split())x2,y2=map(int,input().……