canwen
canwen
全部文章
分类
题解(41)
归档
标签
去牛客网
登录
/
注册
canwen的博客
全部文章
(共51篇)
题解 | #HTTP状态码#
#2022/05/18 21:40 # 单行输入分支练习 # statuscode=int(input()) # if statuscode==200: # print("OK") # elif statuscode==202: # &...
Python3
2022-05-18
0
159
题解 | #牛牛的金币#
#2022/5/18 16:15 x,y=map(int,input().split()) x1,y1=map(int,input().split()) if (abs(x1-x)+abs(y1-y))==1 and x1-x==1: print("r") elif (a...
Python3
2022-05-18
0
112
题解 | #计算商品打折结算金额#
n=float(input()) if 100<=n<500: print(n*0.9) elif 500<=n<2000: print(n*0.8) elif 2000<=n<5000: &n...
Python3
2022-05-18
0
127
题解 | #牛牛的快递#
#2022/5/18 15:32 import math a,b=map(str,input().split()) if 0<float(a)<=1 and str(b)=='y': print(25) elif 0<float(a)<...
Python3
2022-05-18
0
158
题解 | #统计数据正负个数#
a=input().split() count1=0 count2=0 for i in range(len(a)): if int(a[i])>0: count1=count1+1 ...
Python3
2022-05-18
0
120
题解 | #牛牛的二三七整除#
a=int(input()) if a%2==0 and a%3!=0 and a%7!=0: print("2") elif a%2!=0 and a%3==0 and a%7!=0: print("3") elif a%2!=0 and a...
Python3
2022-05-18
1
139
题解 | #判断闰年#
#闰年就是能被4整除,且不能被100整数,或者能被400整数 n=int(input()) if (n%4==0 and n%100!=0 or n%400==0): print("yes") else: print("no")
Python3
2022-05-17
1
218
题解 | #小乐乐排电梯#
# 前面有n个人 # 每次可以乘坐12人 # 每次上下需要时间为上2分钟,下2分钟 # 前面有少于12人,就只需要2分钟就可以上楼 # 当n<=11 # wait=2 # 当n>=12 # wait=(n/12)*4+2 n=int(input()) if n<=11:  ...
Python3
2022-05-17
0
130
题解 | #牛牛的等差数列#
#等差数列是指从第二项起,每一项与它的前一项的差等于同一个常数的一种数列,常用A、P表示。 #这个常数叫做等差数列的公差,公差常用字母d表示。 a,b=map(int,input().split()) d=b-a print(b+d)
Python3
2022-05-16
0
143
题解 | #牛牛的水杯#
#高:h #半径:r #单位:厘米cm*厘米cm*厘米cm=1立方厘米=1毫升 10升=10000毫升 #水杯的体积:V=3.14*h*r**2 立方厘米 #本题考的是立方厘米和10毫升的单位换算问题 import math h,r=map(int,input().split()) v=3.14*h...
Python3
2022-05-16
0
179
首页
上一页
1
2
3
4
5
6
下一页
末页