牛客427561930号
牛客427561930号
全部文章
分类
题解(24)
归档
标签
去牛客网
登录
/
注册
牛客427561930号的博客
全部文章
(共23篇)
题解 | #明明的随机数#
import sys n = int(input()) w = [int(i.strip()) for i in sys.stdin.readlines()] w = set(w) w = sorted(list(w)) for i in w: print(i)
Python3
2022-06-21
0
227
题解 | #矩阵乘法#
x = int(input()) y = int(input()) z = int(input()) xy = [[]]*x yz = [[]]*y xz = [[] for i in range(x)] for i in range(x): xy[i] = xy[i] ...
Python3
2022-05-12
0
241
题解 | #配置文件恢复#
#有点 woc = {"reset":"reset what", "reset board":"board fault", "board add":"where to add", \ "board delete":"no boar...
Python3
2022-05-11
0
276
题解 | #查找两个字符串a,b中的最长公共子串#
w = input() wn = input() def func(x1, x2): if len(x1) > len(x2): op = len(x2) else: ...
Python3
2022-05-10
0
237
题解 | #MP3光标位置#
#应该是栈的使用,进一个出一个。当前播放歌曲好判断,难处在于列表该如何输出。在大于4的情况下需要考虑栈的输入输出。 w = int(input()) n = input() wq = 1 if w > 4: b = [1, 2, 3, 4] &...
Python3
2022-05-10
0
262
题解 | #DNA序列#
w = input() n = int(input()) wn = ['A', 'C', 'G', 'T'] b = [] for i in range(len(w)): if i+n != len(w): x ...
Python3
2022-05-09
0
287
题解 | #四则运算#
#能过纯属运气,大致就是算括号,从小到大算起,先求小括号内部,再求中括号内部,再求大括号内部 a = input() a = [i for i in a] for i in range(len(a)): try: ...
Python3
2022-05-08
4
667
题解 | #从单向链表中删除指定值的节点#
w = list(map(int,input().split())) n = [w[1]] s = w[-1] x = w[2:-1] dian_xu = [] dian_zi = [] for i in range(len(x)): if i%2 == 0:  ...
Python3
2022-05-06
0
267
题解 | #名字的漂亮度#
import sys w = int(input()) n = [i.strip() for i in sys.stdin.readlines()] #函数为取出不重复元素的次数,并按照降序排列 def func1(i): a = {} &n...
Python3
2022-05-05
0
276
题解 | #字符串加密#
import string xiao = string.ascii_lowercase a = [] w = [a.append(i) for i in input() if not i in a] x = [a.append(i) for i in xiao if not i in a] n =...
Python3
2022-05-03
0
229
首页
上一页
1
2
3
下一页
末页