BSF
BSF
全部文章
分类
题解(82)
归档
标签
去牛客网
登录
/
注册
BSF的博客
全部文章
(共81篇)
题解 | #密码验证合格程序#
# 检查长度大于2的重复子串 def check_repeat(s): i = 0 while i + 3 <= len(s): if s.count(s[i:i+3]) > 1: return True # 有重复子串 ...
Python3
2021-10-19
0
517
题解 | #简单错误记录#
dic = {} while True: try: path, line = input().split() # 获取文件名 name = '' for c in path[::-1]: if c ==...
Python3
2021-10-19
1
695
题解 | #识别有效的IP地址和掩码并进行分类统计#
def get_lst(s): lst = [] for i in s.split('.'): if i.isdigit(): lst.append(int(i)) return lst def check_ip(lst): ...
Python3
2021-10-19
8
1048
题解 | #杨辉三角的变形#
while True: try: n = int(input()) if n < 3: print(-1) continue res, temp = [1, 1, 1], [] ...
Python3
2021-10-18
1
514
题解 | #合法IP#
while True: try: nums = input().split('.') if len(nums) != 4: print('NO') continue count = 0 ...
Python3
2021-10-18
0
462
题解 | #成绩排序#
while True: try: n, order = int(input()), int(input()) data = [] # 不能用字典保存,因为可能有名字是重复的 for _ in range(n): name...
Python3
2021-10-18
16
1940
题解 | #表示数字#
while True: try: s = input() res, temp = '', '' for c in s: if c.isdigit(): if '*' not in temp...
Python3
2021-10-18
0
384
题解 | #字符串字符匹配#
while True: try: S, T = input(), input() if set(S) & set(T) == set(S): print('true') else: pri...
Python3
2021-10-18
132
3672
题解 | #在字符串中找出连续最长的数字串#
while True: try: s = input() dic, temp = {}, '' for c in s: if c.isdigit(): temp += c ...
Python3
2021-10-18
0
367
题解 | #学英语#
lst = [ 'one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve', 'thirteen', 'fourteen', 'fifteen', ...
Python3
2021-10-18
0
588
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页