牛客205326165号
牛客205326165号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客205326165号的博客
全部文章
(共4篇)
题解 | 密码截取
s=input() strs='' n=len(s) t=s[::-1] for i in range(n): for j in range(i+1,n): if s[i:j+1] == t[n-j-1:n-i] and j+1-i>len(strs): ...
2025-07-13
0
23
题解 | 字符串加密
s=input() t=input() l=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'] #26字母表 list_s=[] nu...
2025-07-12
0
27
题解 | 统计字符
import re strs=input() a=len(re.findall(r'[a-zA-Z]',strs)) b=len(re.findall(r' ',strs)) c=len(re.findall(r'[0-9]',strs)) d=len(strs)-a-b-c print(a) pr...
2025-07-09
0
27
题解 | 小红的双生串
s=input() n=len(s)//2 max_i=max(set(s[:n]),key=s[:n].count) #找上半部分数量最多的字符 max_j=max(set(s[n+1:]),key=s[n:].count) #找下半部分数量最多的字符 k=len(s)-s[:n].cou...
2025-07-09
0
30