李明新
李明新
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
李明新的博客
全部文章
(共79篇)
题解 | #自守数#
m = input() count = 0 for i in range(int(m)+1): if str(i*i)[-len(str(i)):] == str(i): count += 1 print(count)
2023-06-07
0
179
题解 | #记负均正#
n = int(input()) num = list(map(int, input().split())) count = 0 temp = [] for i in num: if i < 0: count += 1 for j in num: if j &g...
2023-06-07
0
189
题解 | #记票统计#
n = int(input()) name = input().split() m = int(input()) pick = input().split() result = {} for i in name: result[i] = 0 for j in pick: if j ...
2023-06-07
0
167
题解 | #在字符串中找出连续最长的数字串#
import re while True: try: text = input() string = re.split('[a-zA-Z]', text) num = {} for i in string: ...
2023-06-07
0
218
题解 | #合法IP#
s = input().split('.') if "" in s: print('NO') else: if len(s) == 4: if (len(s[0]) != 1 and (s[0][0] == '0' or s[0][0] == '+')) or (le...
2023-06-06
0
186
题解 | #扑克牌大小#
s = input().split("-") a = s[0].split() b = s[1].split() poker = [ "3", "4", "5", "6", "7", "8", "9", "10", "J", ...
2023-06-06
0
222
题解 | #密码强度等级#
import re key = input() score = 0 t = [] # 一、密码长度: if len(key) <= 4: score += 5 elif 4 < len(key) <= 7: score += 10 else: score ...
2023-06-02
0
268
题解 | #求最大连续bit数#
print(len(max(format(int(input()), 'b').split("0"))))
2023-06-02
0
124
题解 | #最长回文子串#
s = input() t, r = [], [] for i in range(len(s)+1): for j in range(len(s)+1): if j-i > 0: r.append(s[i:j]) for i in r: ...
2023-06-02
0
167
题解 | #统计大写字母个数#
import re s = input() r = re.findall('[A-Z]', s) print(len(r))
2023-06-02
0
174
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页