程序媛进行时
程序媛进行时
全部文章
题解
面经(1)
归档
标签
去牛客网
登录
/
注册
程序媛进行时的博客
全部文章
/ 题解
(共4篇)
题解 | #简单密码#
while 1: try: def zhkey(x): inw = ['abc', 'def', 'ghi', 'jkl', 'mno', 'pqrs', 'tuv', 'wxyz'] outw = [2, 3, 4, 5, 6...
Python3
2021-09-22
0
231
题解 | #最长回文子串#
另辟蹊径 while 1: try: str = input().strip() max = 0 n = len(str) if n == 0: print(0) else: ...
Python3
动态规划
2021-09-17
0
405
题解 | #二维数组操作#
while 1: try: m, n = map(int, input().split()) x1, y1, x2, y2 = map(int, input().split()) x = int(input()) y = int...
Python3
2021-09-17
0
311
题解 | #螺旋矩阵#
python3代码主要思路是根据“拐弯”次数angel得到下次要走过多少个数字(向上、下、左、右走可以分别归纳成公式),并且由于每走一个数字就记一次,所以以总步数mn作为循环控制条件。if matrix == []: ret = []else: m = len(matrix) n ...
2021-08-31
0
258