牛客427561930号
牛客427561930号
全部文章
分类
题解(24)
归档
标签
去牛客网
登录
/
注册
牛客427561930号的博客
全部文章
(共23篇)
题解 | #整数与IP地址间的转换#
a = [] for i in input().strip().split('.'): x = bin(int(i))[2:].rjust(8, '0') a.append(x) print(int(''.join(a), 2)) j = 0...
Python3
2022-05-02
0
285
题解 | #字符串加解密#
wn = [i for i in input()] nw = [i for i in input()] def func1(x): for i in range(len(x)): if x[i].islower()...
Python3
2022-04-29
0
310
题解 | #查找兄弟单词#
w = input().strip().split() # a兄弟单词,b需要查找的数,c输入的总单词数,d需要排查的单词数 a, b = w[-2], int(w[-1]) c, d = int(w[0]), w[1:-2] # 存放兄弟词 e = [] for i in d: &n...
Python3
2022-04-29
0
256
题解 | #字符串中找出连续最长的数字串#
q = [i for i in input()] woe = [] for i, f in enumerate(q): if not f.isalpha(): woe.append([i, f]) w = [i...
Python3
2022-04-28
0
209
题解 | #字符串中找出连续最长的数字串#
#题比较简单,如果给出的数字不是顺序的,就会比较麻烦 import re, bisect w = re.findall(r'\d+', input()) n = list(map(int, w)) print(max(n))
Python3
2022-04-26
1
563
题解 | #密码验证合格程序#
import sys, string strw = string.punctuation src_digits = string.digits src_uppercase = string....
Python3
2022-04-24
0
299
题解 | #等差数列#
w = int(input()) b = [2] a = 2 for i in range(1,w): a = a + 3 b.append(a) print(sum(b))
Python3
2022-04-23
0
220
题解 | #等差数列#
w = int(input()) wn = 2 a = 2 def func(n): global a global wn if n == 1: return ...
Python3
2022-04-23
0
225
题解 | #自守数#
import math w = int(input()) b= [] for i in range(w+1): a = str(pow(i, 2))[::-1] if str(i)[::-1] == a[:len(str(i))]: &nb...
Python3
2022-04-23
0
211
题解 | #记负均正#
import sys a, b = sys.stdin.readlines() up = [int(i.strip()) for i in b.split(' ') if int(i) > 0] down = [int(i.strip()) for i in b.split(' ') if...
Python3
2022-04-23
0
203
首页
上一页
1
2
3
下一页
末页