鹿沉
鹿沉
全部文章
分类
归档
标签
去牛客网
登录
/
注册
鹿沉的博客
全部文章
(共43篇)
题解 | BFS
def checkIfExit(): if 'bob' not in s: return -1 for i in range(len(s)): if s[i:i+3] == 'bob': return i s = input...
2025-06-19
0
12
题解 | 斗兽棋
# 输赢的逻辑关系 res = [['elephant', 'tiger'], ['tiger', 'cat'], ['cat', 'mouse'], ['mouse', 'elephant']] line = input().split() # 正序匹配上,则是吃的关...
2025-06-19
0
10
题解 | 年轻人不讲5的
s = input().replace('5', '*') print(s)
2025-06-19
0
12
题解 | 记数问题
n, x = input().split() res = '' for i in range(1, int(n)+1): res += str(i) print(res.count(x))
2025-06-15
0
13
题解 | 数组计数维护
def number(): n, k = map(int, input().split()) a = list(map(int, input().split())) s = cnt = 0 for i in a: if i >= k: ...
2025-06-15
0
14
题解 | 牛牛的数学作业
def math(): n = int(input()) a = list(map(int, input().split())) resA = max(a) - min(a) mid = sum(a)/n resB = 0 for i in a: ...
2025-06-14
0
15
题解 | 左侧严格小于计数
n = int(input()) a = list(map(int, input().split())) b = [0 for i in range(0, n)] for i in range(0, n): for j in range(0, i): if a[j] <...
2025-06-14
0
15
题解 | 神秘石像的镜像序列
a = input().split() for i in a[-2::-1]: print(f'{i} ',end = '')
2025-06-14
0
14
题解 | 牛牛学数列6
n = int(input()) res = [0 for i in range(0, n)] res[0], res[1], res[2] = 0, 1, 1 for i in range(3, n): res[i] = res[i-3] + 2*res[i-2] + res[i-1] p...
2025-06-14
0
13
题解 | 牛牛数数
n = int(input()) for i in range(1, n+1): if '4' not in str(i) and i % 4 != 0: print(i)
2025-06-14
0
14
首页
上一页
1
2
3
4
5
下一页
末页