E.Y.
E.Y.
全部文章
分类
归档
标签
去牛客网
登录
/
注册
E.Y.的博客
全部文章
(共28篇)
题解 | #在字符串中找出连续最长的数字串#
import re while True: try: s = input() s1 = list(map(str,re.findall(r'[0-9]{1,}',s))) s1.sort(key= lambda x:len(x) ,revers...
2023-04-08
1
143
题解 | #记票统计#
from re import I while True: try: n = int(input()) votees = list(map(str,input().split())) m = int(input()) voters...
2023-04-08
0
324
题解 | #表示数字#
import re while True: try: s = input() s1 = re.sub(r'([0-9]{1,})',r'*\1*',s) print(s1) except: break
2023-04-08
0
208
题解 | #记负均正#
b = [] c = 0 while True: try: n = int(input()) ls = list(map(int,input().split())) for a in ls: if a > 0: ...
2023-04-08
0
142
题解 | #等差数列#
while True: try: n = int(input()) ls = [] for i in range(n): ls.append(2 + 3 * i) print(sum(ls)) e...
2023-04-08
1
170
题解 | #输入整型数组和排序标识,升序或降序#
while True: try: n =int(input()) val = list(map(int,input().split())) toggle =int(input()) if toggle == 0: ...
2023-04-08
1
182
题解 | #字符统计#
while True: try: dic = {} k = input() for i in k: if i in dic.keys(): dic[i] += 1 ...
2023-04-08
0
171
题解 | #求最小公倍数#
from math import lcm # math.gcd 最大公约数 math.lcm 最小公倍数 while True: try: a, b = map(int, input().split()) print(lcm(a,b)) except:...
2023-04-08
1
303
首页
上一页
1
2
3
下一页
末页