牛客484960258号
牛客484960258号
全部文章
分类
题解(49)
归档
标签
去牛客网
登录
/
注册
牛客484960258号的博客
全部文章
(共47篇)
题解 | #表示数字#
while True: try: a = input() b = a j = -1 for i in range(0,len(a)-1): if not a[i].isnumeric() and a[i+...
Python3
2021-12-29
0
303
题解 | #查找两个字符串a,b中的最长公共子串#
def myfunc(x): for j in range(len(a)-x+1): if a[j:j+x] in b: return(a[j:j+x]) return None while True: try: a ...
Python3
2021-12-28
0
338
题解 | #MP3光标位置#
def myfunc(num,disp_l,disp_n,orde): if disp_l == [1,2,3,4] and disp_n == 1 and orde == 'U': disp_l = [ i for i in range(num-3,num+1) ] ...
Python3
2021-12-28
0
390
题解 | #DNA序列#
while True: try: DNA = input() length = int(input()) max_counts = 0 max_DNA = [] for i in range(len(DNA)-l...
Python3
2021-12-28
24
2959
题解 | #名字的漂亮度#
while True: try: num = int(input()) pld = range(26,0,-1) for i in range(num): name = input() chars...
Python3
2021-12-28
6
711
题解 | #统计字符#
while True: try: a = input() n_char = 0 n_space = 0 n_digit = 0 n_other = 0 for i in a: ...
Python3
2021-12-27
0
327
题解 | #字符串加密#
while True: try: a = input().lower() original_code = input() a = list(dict.fromkeys(a)) b = [chr(i) for i in range...
Python3
2021-12-27
1
446
题解 | #Redraiment的走法#
def lentotal(nums): L = [1] * a for i in reversed(range(a)): for j in range(i+1,a): if nums[i] < nums[j]: ...
Python3
2021-12-27
1
570
题解 | #Redraiment的走法#
def lenfirst(nums,i): if i in memo.keys(): return memo[i] if len(nums[i:]) == 1: return 1 res = 1 for j in range(i+1,l...
Python3
2021-12-27
1
556
题解 | #合法IP#
while True: try: a = input().split('.') b = 0 for i in a: if i.isnumeric() == True and 0 <= int(i) <= 25...
Python3
2021-12-26
0
368
首页
上一页
1
2
3
4
5
下一页
末页