数学(转换为两点的距离计算) 摘要:d1,p1,q1,d2,p2,q2=map(int,input().split())m=1 # 类似根号3dict1={0:-1,1:-0.5,2:0.5,3:1,4:0.5,5:-0.5}dict2…… 题解列表 2022年10月24日 0 点赞 0 评论 753 浏览 评分:6.0
将多位数拆解为单位数,善用整除和求余 摘要:解题思路:注意事项:参考代码:n=input()u=0##for _ in n:## print('_:',_)## if int(_)%2!=0:## u=u…… 题解列表 2022年10月24日 0 点赞 0 评论 235 浏览 评分:0.0
编写题解 2847: 找第一个只出现一次的字符 摘要:解题思路:Python count() 方法用于统计字符串里某个字符或子字符串出现的次数。注意事项:1)语法:str.count(sub, start= 0,end=len(string))2)参数解…… 题解列表 2022年10月23日 0 点赞 0 评论 430 浏览 评分:7.5
编写题解 2846: 统计数字字符个数 摘要:解题思路:str.isdigit(),判断字符是否为数字注意事项:参考代码:n=input() count=0 for i in n: if i.isdigit(): #判断字符是否为数…… 题解列表 2022年10月23日 0 点赞 0 评论 1050 浏览 评分:9.9
[编程入门]矩阵对角线求和,最容易理解的解法,非常暴力 摘要:解题思路:注意事项:没有丝毫含金量参考代码:x=list(map(int,input().split()))y=list(map(int,input().split()))z=list(map(int…… 题解列表 2022年10月23日 1 点赞 0 评论 937 浏览 评分:10.0
编写题解 2837: 年龄与疾病 摘要:解题思路:1)定义4个count计数器2)输出%:'%.2f%%'%n注意事项:参考代码:n=int(input()) #病人数目 ages=list(map(int,input()…… 题解列表 2022年10月23日 0 点赞 0 评论 940 浏览 评分:9.9
编写题解 2836: 数组逆序重放 摘要:解题思路:逆序:nums[::-1]注意事项:参考代码:n=int(input()) nums=list(map(int,input().split())) #打包为整型数组 for i in n…… 题解列表 2022年10月23日 0 点赞 0 评论 685 浏览 评分:9.3
编写题解 2835: 计算书费 摘要:解题思路:注意事项:参考代码:price=[28.9,32.7,45.6,78,35,86.2,27.8,43,56,65] #将价格储存进数组 nums=list(map(int,input().…… 题解列表 2022年10月23日 0 点赞 0 评论 838 浏览 评分:9.9
编写题解 1098: 陶陶摘苹果 摘要:解题思路:定义count指针计数注意事项:参考代码:h1=list(map(int,input().split())) #苹果到地面高度,打包为整型数组 h2=int(input()) #陶陶把手伸…… 题解列表 2022年10月23日 0 点赞 0 评论 681 浏览 评分:9.6
编写题解 2834: 与指定数字相同的数的个数 摘要:解题思路:定义count计数器注意事项:参考代码:n=int(input()) nums=list(map(int,input().split())) #打包为整型数组 m=int(input()…… 题解列表 2022年10月23日 0 点赞 0 评论 1362 浏览 评分:9.9