Compare commits

...

2 Commits

Author SHA1 Message Date
27bebc97c0 feat: 添加日期计算功能实现
实现日期相关计算功能,包括闰年判断和日期差计算
2025-09-22 15:26:37 +08:00
daad891ca8 feat: 添加 P10187 的 C++ 和 Python 解决方案
添加了 P10187 问题的 C++ 和 Python 实现代码。Python 代码实现了从标准输入读取数据并处理输出,C++ 代码目前为空框架
2025-09-22 13:32:58 +08:00
3 changed files with 33 additions and 0 deletions

3
src/9/22/P10187.cpp Normal file
View File

@ -0,0 +1,3 @@
int main(){
}

9
src/9/22/P10187.py Normal file
View File

@ -0,0 +1,9 @@
from sys import stdin
stdread = stdin.read()
nstr = stdread.split()
for i in nstr[1:]:
if i[-1] == "0":
print("E")
else:
print("B")

21
src/9/22/P7075getd.py Normal file
View File

@ -0,0 +1,21 @@
def isr(n:int)->bool:
if n%4==0:
return True
return False
def r(a:int,b:int)->int:
ret = 0
for i in range(a,b+1):
if isr(i):
ret+=1
return ret
md = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31]
bf = 400*365+r(1,400)
d1600 = 4*bf
d1582 = d1600 - 19*365 - 5
ac = d1582 + sum(md[1:10])+4
d4713 = 4800//400*bf - r(4713,4800) - (4800-4713)*365
print(d4713 + ac)