Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 52efc03

Browse files
authored
Solution
1 parent d49867e commit 52efc03

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/python3
2+
3+
import math
4+
import os
5+
import random
6+
import re
7+
import sys
8+
9+
# Complete the solve function below.
10+
def solve(year):
11+
if (year == 1918):
12+
return '26.09.1918'
13+
elif ((year <= 1917) & (year%4 == 0)) or ((year > 1918) & (year%400 == 0 or ((year%4 == 0) & (year%100 != 0)))):
14+
return '12.09.%s' %year
15+
else:
16+
return '13.09.%s' %year
17+
18+
if __name__ == '__main__':
19+
fptr = open(os.environ['OUTPUT_PATH'], 'w')
20+
21+
year = int(input())
22+
23+
result = solve(year)
24+
25+
fptr.write(result + '\n')
26+
27+
fptr.close()

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /