cfn
cfn
全部文章
分类
归档
标签
去牛客网
登录
/
注册
cfn的博客
全部文章
(共137篇)
题解 | #小乐乐算多少人被请家长#
n=int(input()) m=0 for i in range(n): a,b,c=map(int,input().split()) if (a+b+c)/3<60: m+=1 print(m)
2023-02-12
1
232
题解 | #包含数字9的数#
count=0 for i in range(1,2020): if "9" in str(i): count+=1 print(count)
2023-02-12
1
168
题解 | #魔法数字变换#
n=int(input()) m=0 while n>1: if n%2==0: n=n//2 m+=1 if n==1: print(m) else: n=n*3+1 m+...
2023-02-12
1
216
题解 | #数位之和#
n=input() s=0 for i in n: s+=int(i) print(s)
2023-02-05
1
286
题解 | #牛牛学数列4#
n=int(input()) m=0 s=0 for i in range(1,n+1): m+=i s+=m print(s)
2023-02-05
1
284
题解 | #牛牛学数列3#
n=int(input()) m=0 s=0 for i in range(1,n+1): m+=((-1)**(i-1))*(2*i-1) s+=1/m print(f"{s:.3f}")
2023-02-05
1
227
题解 | #牛牛学数列2#
n=int(input()) sum=0 if n==0: print(0) else: for i in range(1,n+1): sum+=1/i sum=sum print(f"{sum:.6f}")
2023-02-05
1
337
题解 | #牛牛学数列#
n=int(input()) if n%2==0: print(-n//2) else: print((n+1)//2)
2023-02-05
1
242
题解 | #乘法表#
for i in range(1,10):#i行 for j in range(1,i+1):#j列 print(f"{j}*{i}={str(j*i).rjust(2)}",end=" ") print()
2023-02-05
1
251
题解 | #KiKi求质数个数#
a = 0 for i in range(100, 1000): for j in range(2, i): if (i % j) ==0: break else: a += 1 print(a)
2023-01-08
1
243
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页