Skip to content

Commit c8da59f

Browse files
15
1 parent cd896a5 commit c8da59f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

Diff for: 15.py

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import datetime
2+
3+
def main():
4+
for i in range(100):
5+
s = "1"
6+
if i < 10:
7+
s += "0"
8+
s += str(i)
9+
s += "6"
10+
year = int(s)
11+
if leap(year):
12+
d = datetime.datetime(year, 1, 27).strftime("%w")
13+
if d == "2":
14+
print(year)
15+
16+
def leap(year):
17+
result = False
18+
if year % 4 == 0:
19+
if year % 100 == 0:
20+
if year % 400 == 0:
21+
result = True
22+
else:
23+
result = False
24+
else :
25+
result = True
26+
else:
27+
result = False
28+
return result
29+
30+
if __name__ == "__main__":
31+
main()

0 commit comments

Comments
 (0)