XG0701
XG0701
全部文章
分类
题解(13)
归档
标签
去牛客网
登录
/
注册
XG0701的博客
全部文章
(共4篇)
题解 | 2024/10/12(模拟)(Python)
注意点 (1)只需枚举年份以缩短时间复杂度 (2)闰年判定及二月天数的修改 def f(year: int) -> None: # 修改 2 月的天数 months[2] = 29 if year % 400 == 0: return if year ...
Python3
模拟
字符串
2024-10-12
0
91
题解 | 2024/10/12(模拟)(Python)
n = int(input()) lst = list() for _ in range(n): a, b, g, k = map(int, input().split()) lst.append((a, b, a + g, b + k)) x, y = map(int, inpu...
Python3
模拟
2024-10-12
0
55
题解 | 2024/10/11(模拟)(Python)
n = int(input()) a = list(map(int, input().split())) flag = False # 记录是否输出第一项 for i in range(n + 1): if a[i] == 0: continue # 输出连接号...
Python3
模拟
2024-10-11
0
69
题解 | 2024/10/11(字符串 + 模拟)(Python)
p1, p2, p3 = map(int, input().split()) s = input() ans = "" for i, ch in enumerate(s): if ch == '-' and 0 < i < len(s) - 1: # 扩展 p...
Python3
字符串
模拟
2024-10-11
0
91