信雪神话
信雪神话
全部文章
题解
归档
标签
去牛客网
登录
/
注册
信雪神话的博客
菜到能抠出白令海峡
全部文章
/ 题解
(共16篇)
题解 | #迷宫问题#
尝试在回溯时处理死路情况,主要实现参考下面代码https://blog.nowcoder.net/n/478eaf14b4b246ac9d6d31f313493690 while True: try: row, col = [int(x) for x in input().s...
Python3
2022-02-15
0
520
题解 | #学英语#
输入数据小于2000000,所以热门大佬的代码可以简化 num1 = ['zero','one','two','three','four','five','six', 'seven','eight','nine','ten','eleven','twelve', 'thi...
Python3
2022-02-14
10
1486
题解 | #单词倒排#
words = input() re =[] ss='' for i in range(len(words)): if 'a'<= words[i] <='z' or 'A'<= words[i] <='Z': ss += words[i] e...
Python3
2022-02-11
3
537
题解 | #查找兄弟单词#
while True: try: data = input().split() num = int(data[0]) data.pop(0) check_word = data[-2] data.pop(-2)...
Python3
2022-02-10
0
408
题解 | #字符串排序#
while True: try: s = input() a = '' for i in s: if i.isalpha(): a += i#获得全部的字母 b = sor...
Python3
2022-02-09
2
416
题解 | #删除字符串中出现次数最少的字符#python3用set去重并维护计数列表,再按列表删除字符
def deleletters(ss): ss = list(ss) sskey = list(set(ss)) dif_letters = len(sskey) count = dif_letters*[0] for i in ...
Python3
2022-02-08
5
1355
题解 | #汽水瓶#python3递归
total = 0 def fun(num): global total if num <2: print(total) return 0 elif num ==2: total +=1 ...
Python3
2022-02-08
1
396
题解 | #简单密码#python3
fake = input() true = list(fake) for i in range(len(fake)): if 'a'<= fake[i] <='z': if fake[i] in 'abc': true[i] = '2' ...
Python3
2022-02-07
8
1920
题解 | #密码验证合格程序#python3速度快于65%
def check(sub_pswd): if len(sub_pswd) <=8: return False flag =[0,0,0,0] for i in sub_pswd: if '0'<= i <='9': ...
Python3
2022-02-07
22
1298
题解 | #坐标移动#python3过滤法
data = input().split(';') e_command=[] for command in data: length = len(command) if length == 3 or length == 2: if command[0]...
Python3
2022-02-02
5
580
首页
上一页
1
2
下一页
末页