鹿沉
鹿沉
全部文章
分类
归档
标签
去牛客网
登录
/
注册
鹿沉的博客
全部文章
(共45篇)
题解 | 无限长正整数排列字符串
n = int(input()) res = '' for i in range(1, n + 1): res += str(i) print(res[n-1])
2025-06-20
2
48
题解 | 凯撒加密
n = int(input()) res = 'abcdefghijklmnopqrstuvwxyz' * (n + 1) s = input() result = '' for i in s: j = res.index(i) result += res[j + n] print(...
2025-06-19
0
33
题解 | 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
29
题解 | 斗兽棋
# 输赢的逻辑关系 res = [['elephant', 'tiger'], ['tiger', 'cat'], ['cat', 'mouse'], ['mouse', 'elephant']] line = input().split() # 正序匹配上,则是吃的关...
2025-06-19
1
29
题解 | 年轻人不讲5的
s = input().replace('5', '*') print(s)
2025-06-19
0
33
题解 | 记数问题
n, x = input().split() res = '' for i in range(1, int(n)+1): res += str(i) print(res.count(x))
2025-06-15
0
25
题解 | 数组计数维护
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
44
题解 | 牛牛的数学作业
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
28
题解 | 左侧严格小于计数
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
50
题解 | 神秘石像的镜像序列
a = input().split() for i in a[-2::-1]: print(f'{i} ',end = '')
2025-06-14
0
30
首页
上一页
1
2
3
4
5
下一页
末页