BSF
BSF
全部文章
分类
题解(82)
归档
标签
去牛客网
登录
/
注册
BSF的博客
全部文章
(共81篇)
题解 | #DNA序列#
while True: try: s, n = input(), int(input()) if n >= len(s): print(s) else: Max, beg, end = 0,...
Python3
2021-10-17
0
385
题解 | #截取字符串#
while True: try: s, n = input(), int(input()) print(s[:n]) except: break
Python3
2021-10-17
0
338
题解 | #名字的漂亮度#
while True: try: n = int(input()) names = [input() for _ in range(n)] for name in names: dic = {} ...
Python3
2021-10-17
0
379
题解 | #字符串合并处理#
while True: try: # 第一步 s = ''.join(input().split()) # 第二步 l1 = [s[i] for i in range(len(s)) if i % 2 == 0] # 下标偶数 ...
Python3
2021-10-17
0
554
题解 | #字符串加解密#
letters = 'abcdefghijklmnopqrstuvwxyz' nums = '0123456789' def encode(s): res = '' for c in s: if c.isalpha(): if c.isupp...
Python3
2021-10-17
0
513
题解 | #删除字符串中出现次数最少的字符#
while True: try: s = input() dic, res = {}, '' for c in s: if c not in dic: dic[c] = 1 ...
Python3
2021-10-17
110
5756
题解 | #字符统计#
while True: try: s = input() # 统计字符次数 dic = {} for c in s: if c not in dic: dic[c] = 1...
Python3
2021-10-16
0
474
题解 | #字符串排序#
while True: try: s = input() already, lst, dic = [], [], {} # 连接相同的字母(忽略大小写),将其添加到lst中,如['Bb', 'aA'] # 同时用dic记录非字母...
Python3
2021-10-16
3
580
题解 | #密码强度等级#
levels = { 90 : 'VERY_SECURE', 80 : 'SECURE', 70 : 'VERY_STRONG', 60 : 'STRONG', 50 : 'AVERAGE', 25 : 'WEAK', 0 : 'VERY_WE...
Python3
2021-10-16
0
483
题解 | #走方格的方案数#
动态规划: while True: try: n, m = map(int, input().split()) dp = [[1] * (n+1)] + [[1] + [0] * n for _ in range(m)] for i in ra...
Python3
2021-10-16
0
401
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页