mirror of
https://gitcode.com/Zengtudor/alg2025.git
synced 2025-12-21 14:41:45 +00:00
Compare commits
2 Commits
dc8c323910
...
27bebc97c0
| Author | SHA1 | Date | |
|---|---|---|---|
| 27bebc97c0 | |||
| daad891ca8 |
3
src/9/22/P10187.cpp
Normal file
3
src/9/22/P10187.cpp
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
int main(){
|
||||||
|
|
||||||
|
}
|
||||||
9
src/9/22/P10187.py
Normal file
9
src/9/22/P10187.py
Normal 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
21
src/9/22/P7075getd.py
Normal 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)
|
||||||
Loading…
Reference in New Issue
Block a user