李明新
李明新
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
李明新的博客
全部文章
(共79篇)
题解 | #二维数组操作#
while True: try: m, n = list(map(int, input().split())) x1, y1, x2, y2 = list(map(int, input().split())) x3 = int(input())...
2023-06-02
0
196
题解 | #字符串字符匹配#
a = input() b = input() count = 0 if len(a) <= len(b): a, b = a, b else: a, b = b, a for i in a: if i in b: count += 1 if count...
2023-06-02
0
185
题解 | #整型数组合并#
m = int(input()) num1 = list(map(int, input().split())) n = int(input()) num2 = list(map(int, input().split())) num1.extend(num2) num = list(set(num1)...
2023-06-02
0
195
题解 | #尼科彻斯定理#
m = int(input()) m3 = m*m*m oddNum = [] for i in range(m3): if i % 2 != 0: oddNum.append(i) for j in range(len(oddNum)): if sum(oddNum...
2023-06-01
0
196
题解 | #公共子串计算#
a = input() b = input() r = [] if len(a) <= len(b): a, b = a, b else: a, b = b, a for i in range(len(a)+1): for j in range(len(b)+1): ...
2023-06-01
0
195
题解 | #计算日期到天数转换#
import datetime y, m, d = list(map(int, input().split())) date = datetime.datetime(y, m, d) - datetime.datetime(y - 1, 12, 31) print(str(date).split(...
2023-06-01
0
155
题解 | #百钱买百鸡问题#
n = int(input()) r = [[0, 25, 75], [4, 18, 78], [8, 11, 81], [12, 4, 84]] for i in r: for j in i: print(j, end=' ') print()
2023-06-01
0
206
题解 | #矩阵乘法#
x = int(input()) y = int(input()) z = int(input()) A, B = [], [] for i in range(x): a = list(map(int, input().split())) A.append(a) for i in ...
2023-05-31
0
193
题解 | #成绩排序#
n = int(input()) t = int(input()) table = [] for i in range(n): point = input().split() table.append((point[0], int(point[1]))) v0 = sorted(...
2023-05-31
0
200
题解 | #配置文件恢复#
while True: try: commond = { "reset": "reset what", "reset board": "board fault", "board add": "where ...
2023-05-30
0
210
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页