兰顿蚂蚁python代码,正确,小白水平可读懂 摘要:解题思路:注意事项:参考代码:#兰顿蚂蚁#输入m,n=map(int,input().split())l1=[]for i in range(m):#输入矩阵 l1.append(list(ma…… 题解列表 2022年10月29日 0 点赞 0 评论 448 浏览 评分:7.0
编写题解 1810: [编程基础]输入输出练习之精度控制3 摘要:解题思路:用format控制输出注意事项:map函数的用法参考代码:a,b,c,d = map(str,input().split())print("{} {:>4} {:.2f} {:.12f}".…… 题解列表 2022年10月28日 0 点赞 6 评论 762 浏览 评分:8.0
编写题解 2850: 输出亲朋字符串 摘要:解题思路:设计两个移动指针count1,count2注意事项:参考代码:str=input() ls=[] #初始化空列表 count1=0 #设计两个相邻指针并初始化 count2=1 wh…… 题解列表 2022年10月28日 0 点赞 1 评论 1192 浏览 评分:9.9
编写题解 2849: 石头剪子布 摘要:解题思路:注意事项:参考代码:ls=["Rock", "Scissors", "Paper"] #选择 def judge(S1,S2): if S1==S2: #平局 …… 题解列表 2022年10月28日 0 点赞 0 评论 1018 浏览 评分:7.7
最简的题解,等比公式求和 摘要:解题思路:要多利用数学公式注意事项:参考代码:b=int(input()) a=100*(1-0.5**b)*4-100 //路程是位移的两倍,减去一开始多算的100就行了 print(…… 题解列表 2022年10月27日 0 点赞 0 评论 615 浏览 评分:9.0
混个经验值 摘要:解题思路:............................注意事项:参考代码:num=eval(input()) a=0 for i in range(2,num): if nu…… 题解列表 2022年10月26日 0 点赞 0 评论 517 浏览 评分:0.0
2种方法写题解 摘要:解题思路:注意事项:参考代码:a= input()k=0for i in a: if 47<ord(i) and ord(i)<58: #ASCII码判断是不是数字 k+=1pr…… 题解列表 2022年10月25日 0 点赞 0 评论 698 浏览 评分:0.0
1431蓝桥杯2014年第五届真题-分糖果题解 摘要:解题思路:运用列表里面最后一个数据的索引可以是n-1也可以是-1,来进行遍历注意事项:参考代码:n= int(input()) #一开始为了方便自己查看,输入里面有个‘人数’,然后一直错误list…… 题解列表 2022年10月25日 0 点赞 0 评论 485 浏览 评分:0.0
数学(转换为两点的距离计算) 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={0:0,1:m*0.5,2:m*0.5,3:0, 题解列表 2022年10月24日 0 点赞 0 评论 1049 浏览 评分:6.0
将多位数拆解为单位数,善用整除和求余 摘要:解题思路:注意事项:参考代码:n=input()u=0##for _ in n:## print('_:',_)## if int(_)%2!=0:## u=u…… 题解列表 2022年10月24日 0 点赞 0 评论 588 浏览 评分:0.0