E.Y.
E.Y.
全部文章
分类
归档
标签
去牛客网
登录
/
注册
E.Y.的博客
全部文章
(共28篇)
题解 | 谐距下标对
from collections import Counter n = int(input()) a = list(map(int, input().split())) c = [] for i in range(len(a)): c.append(a[i] - i) #print(...
2025-12-12
0
12
题解 | #整型数组合并#
while True: try: n1 = int(input()) a1 = list(map(int,input().split())) n2 = int(input()) a2 = list(map(int,input()...
2023-04-10
0
178
题解 | #字符串字符匹配#
while True: try: S = input() L = input() c = 0 for i in S: if i in L: # 开始出现的字母后面还可能出现, ...
2023-04-10
0
189
题解 | #统计大写字母个数#
while True: try: s = input() n = 0 for i in s: if i.isupper(): n += 1 print(n) exc...
2023-04-10
0
247
题解 | #统计大写字母个数#
while True: try: s = input() n = 0 for i in s: if i.isupper(): n += 1 print(n) exc...
2023-04-10
0
184
题解 | #求最大连续bit数#
while True: import re try: n = int(input()) b = bin(n)[2:] # bin(n)是0b打头的二进制 s = re.findall(r'[1]{1,}',b) s.so...
2023-04-10
0
169
题解 | #密码强度等级#
import re while True: try: s = input() score = 0 length = len(s) upper = len(re.findall(r"[A-Z]", s)) low...
2023-04-10
0
233
题解 | #计算日期到天数转换#
from dataclasses import make_dataclass while True: try: m_d = [31,28,31,30,31,30,31,31,30,31,30,31] # 平年2月有28天 y,m,d = map(int,inp...
2023-04-10
0
216
题解 | #百钱买百鸡问题#
while True: try: a = int(input()) for i in range(100//5+1): #只买公鸡最多20只 for j in range(100//3+1): #只买母鸡最多33只 ...
2023-04-09
1
229
题解 | #查找输入整数二进制中1的个数#
while True: try: n = int(input()) b = bin(n) print(b.count('1')) except: break
2023-04-09
0
164
首页
上一页
1
2
3
下一页
末页