cfn
cfn
全部文章
分类
归档
标签
去牛客网
登录
/
注册
cfn的博客
全部文章
(共137篇)
题解 | #奇偶统计#
n=int(input()) a=[] b=[] for i in range(1,n+1): if i%2==0: a.append(i) else: b.append(i) print(len(b),len(a),end=" ")
2023-01-08
1
283
题解 | #小乐乐求和#
n=int(input()) # sum=0 # i=0 # while i<n: # i+=1 # sum=sum+i # print(sum) # print(sum(range(1,n+1))) print(((1+n)*n)//2)
2023-01-08
1
299
题解 | #KiKi说祝福语#
n=int(input()) print("Happy new year!Good luck!""\n"*n)
2023-01-08
1
326
题解 | #简单计算器#
n=input() if "+"in n: a=float(n.split("+")[0]) b=float(n.split("+")[1]) print(f"{a:.4f}+{b:.4f}={a+b:.4f}") elif "-"in n: a=float(n.sp...
2023-01-08
1
198
题解 | #[NOIP2008]ISBN号码#
n=input() a=n.split("-")[0] b=n.split("-")[1] c=n.split("-")[2] d=n.split("-")[3] m=(int(a) * 1 + int(b[0]) * 2 + int(b[1]) * 3 + int(b[2]) * 4 + int(...
2023-01-08
1
265
题解 | #小乐乐是否被叫家长#
a,b,c=map(int,input().split()) m=a+b+c if m/3>=60: print("NO") else: print("YES")
2023-01-08
1
235
题解 | #获得月份天数#
while True: try: y,m=map(int,input().split()) if y%4==0 and y%100!=0 or y%400==0: if m in [1,3,5,7,8,10,12]: ...
2022-12-22
1
226
题解 | #牛牛的计划#
y,m,d=map(int,input().split()) y1,m1,d1=map(int,input().split()) if y1*365+m1*30+d1>=y*365+m*30+d: print("yes") else: print("no")
2022-12-22
1
188
题解 | #三角形判断#
while True: try: a,b,c=map(int,input().split()) if a+b<=c or a+c<=b or b+c<=a: print("Not a triangle!") ...
2022-12-22
1
190
题解 | #牛牛的一周#
n=input() dict={"1":"Monday","2":"Tuesday","3":"Wednesday","4":"Thursday","5":"Friday","6":"Saturday","7":"Sunday"} print(dict[n])
2022-12-22
1
196
首页
上一页
3
4
5
6
7
8
9
10
11
12
下一页
末页