牛客484960258号
牛客484960258号
全部文章
分类
题解(49)
归档
标签
去牛客网
登录
/
注册
牛客484960258号的博客
全部文章
(共47篇)
题解 | #求小球落地5次后所经历的路程和第5次反弹的高度#
while True: try: H = int(input()) S = 0 - H for i in range(5): S = S + H * 2 H = H/2 print...
Python3
2021-12-26
16
1100
题解 | #迷宫问题#
def directions(x,y,path): poss_dire = [] if 0 <= x + 1 < a and 0 <= y < b and not (x+1,y) in path and Maze[x+1][y] == 0: p...
Python3
2021-12-26
0
404
题解 | #蛇形矩阵#
def func(x): result = [ [int(((i+j)*(i+j+1)/2+j+1)) for j in range(x-i)] for i in range(x)] return result while True: try: a = in...
Python3
2021-11-24
1
462
题解 | #蛇形矩阵#
def func(x): result = [ [0 for j in range(x-i)] for i in range(x)] for i in range(len(result)): result[i][0] = int(i * (i+1) / 2 + 1) ...
Python3
2021-11-24
0
362
题解 | #图片整理#
def func(x): return ord(x) while True: try: a = input() b = sorted(a,key=func) print("".join(b)) except: ...
Python3
2021-11-24
0
369
题解 | #字符串排序#
def func(x): return ord(x.lower()) while True: try: a = input() b = [] c = [] for i in range(len(a)): ...
Python3
2021-11-24
0
356
题解 | #找出字符串中第一个只出现一次的字符#
while True: try: a = input() count = -1 for i in range(len(a)): if a.count(a[i]) == 1: count =...
Python3
2021-11-24
22
1922
题解 | #从单向链表中删除指定值的节点#
L = list(map(int,input().split())) N = L[0] L = L[2:] new_L = [] new_L.append(L[1]) while len(L) > 1: a,b = L[0:2] new_L.insert(new_L.index...
Python3
2021-11-23
0
343
题解 | #简单密码#
a = input() def func(x): if x in ['a','b','c']: return '2' elif x in ['d','e','f']: return '3' elif x in ['g','h','i']: ...
Python3
2021-11-23
0
455
题解 | #字符串排序#
a = int(input()) b = [] for i in range(a): x = input() b.append(x) b.sort() print("\n".join(b))
Python3
2021-11-23
0
480
首页
上一页
1
2
3
4
5
下一页
末页