BSF
BSF
全部文章
题解
归档
标签
去牛客网
登录
/
注册
BSF的博客
全部文章
/ 题解
(共82篇)
题解 | #合唱队#
# 动态规划 def lengthOfLIS(lst): dp = [] for i in range(len(lst)): dp.append(1) for j in range(i): if lst[i] > lst[...
Python3
2021-10-20
25
3396
题解 | #完全数计算#
while True: try: n = int(input()) count = 0 for i in range(1, n+1): temp = [] for j in range(1, i)...
Python3
2021-10-20
0
400
题解 | #尼科彻斯定理#
while True: try: n = int(input()) res, nums = n ** 3, [] for i in range(1, res, 2): nums.append(i) for...
Python3
2021-10-20
0
477
题解 | #记票统计#
while True: try: n, names, total, rotes = int(input()), input().split(), int(input()),input().split() dic = {k : 0 for k in names}...
Python3
2021-10-20
0
424
题解 | #四则运算#
# 将输入的表达式中的数字和符号区分开,并保存到列表中 def group(s): num, res = '', [] for i, c in enumerate(s): if c.isdigit(): num += c # 数字可能有很多位数...
Python3
2021-10-20
25
3034
题解 | #判断两个IP是否属于同一子网#
def check_ip(ip): lst = ip.split('.') if len(lst) != 4: return False for i in lst: if not i.isdigit(): return ...
Python3
2021-10-19
0
536
题解 | #计算日期到天数转换#
def leap_year(year): if year % 400 == 0: return True else: if year % 4 == 0 and year % 100 != 0: return True ...
Python3
2021-10-19
0
505
题解 | #参数解析#
while True: try: s = input() flag, temp, args = False, '', [] for c in s + ' ': if c == '"': #...
Python3
2021-10-19
1
564
题解 | #挑7#
while True: try: n = int(input()) if n < 7: print(0) continue count = 0 for i in range(...
Python3
2021-10-19
1
556
题解 | #整数与IP地址间的转换#
while True: try: ip, long = input(), int(input()) # 将ip地址分段 nums = list(map(int, ip.split('.'))) # 将每段转换成8位二进制 ...
Python3
2021-10-19
0
535
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页