full_hope
full_hope
全部文章
分类
题解(55)
归档
标签
去牛客网
登录
/
注册
full_hope的博客
全部文章
(共52篇)
题解 | #表示数字#
import re def func(s): str1 = re.sub('[0-9]+','*\g<0>*',s) print(str1) while...
Python3
2022-01-30
9
885
题解 | #计算字符串的距离#
# 不好理解,硬背吧 def func(str1,str2): lst = [[i+j for j in range(len(str2)+1)] for ...
Python3
2022-01-30
0
710
题解 | #统计大写字母个数#
import re def func(string): f = re.sub('[^A-Z]','',string) print(len(f)) while&nbs...
Python3
2022-01-29
0
247
题解 | #记负均正II#
li_zs = [] li_fs = [] while 1: try: n = int...
Python3
2022-01-29
0
275
题解 | #在字符串中找出连续最长的数字串#
import re def func(string): a = re.sub('[a-zA-Z]',',',string) lst =&nb...
Python3
2022-01-29
0
322
题解 | #取近似值#
a = input() b = a.split('.') if int(b[1][0])>=5: print(int(b[0])+1) else: ...
Python3
2022-01-29
20
486
题解 | #整数与IP地址间的转换#
def func(lst): s="" for i in lst: s+=i.replace('0b','').zfill(8) print(int(s,2))...
Python3
2022-01-29
3
579
题解 | #走方格的方案数#
go = [lambda x1,y1:(x1+1,y1), lambda x1,y1:(x1,y1-1)] def func(x1,y1,x2,y2):  ...
Python3
2022-01-29
0
265
题解 | #百钱买百鸡问题#
a=input() for i in range(100//5): for j in range((100-i*5)//3): &n...
Python3
2022-01-29
0
252
题解 | #删除字符串中出现次数最少的字符#
def func(lst): dic = {} for i in lst: &nbs...
Python3
2022-01-29
0
244
首页
上一页
1
2
3
4
5
6
下一页
末页