学习小生
学习小生
全部文章
分类
归档
标签
去牛客网
登录
/
注册
学习小生的博客
全部文章
(共36篇)
题解 | 表示数字
s = list(input()) lens = len(s) res = s.copy() if s[0].isdigit(): res[0] = "*"+res[0] for i in range(1,lens): if not s[i].isdigit() ...
2025-08-24
0
24
题解 | 记票统计
n = int(input()) c = input().split() m = int(input()) v = input().split() number = 0 for i in c: print(i+" : "+str(v.count(i))) numb...
2025-08-24
0
22
题解 | 密码强度等级
# 先统计数字、大小写字母、字符的个数再进行判断 s = input() score = 0 # 一、密码长度 if len(s) <= 4: score += 5 elif len(s) <= 7: score += 10 else: score +=25 co...
2025-08-23
0
22
题解 | 求最大连续bit数
print(max([len(i) for i in bin(int(input()))[2:].split("0")]))
2025-08-23
1
20
题解 | 统计大写字母个数
s = input() count = 0 for i in s: if ord(i) >= 65 and ord(i) <= 90: count += 1 print(count)
2025-08-23
0
23
题解 | 字符串字符匹配
s = input() t = input() def func(s,t): for i in s: if i not in t: return "false" return "true" print(f...
2025-08-23
0
20
首页
上一页
1
2
3
4
下一页
末页