Skip to content

Commit c6924e7

Browse files
Day of the Programmer
1 parent 4ea1506 commit c6924e7

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# include <bits/stdc++.h>
2+
3+
#define fast ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL)
4+
#define f(i,a,b) for(i=a;i<b;i++)
5+
#define fr(i,a,b) for(i=a;i>=b;i--)
6+
#define endl '\n'
7+
#define ll long long int
8+
#define ff first
9+
#define ss second
10+
#define pb push_back
11+
#define mp make_pair
12+
#define mod 1000000007
13+
14+
using namespace std;
15+
16+
main()
17+
{
18+
int year;
19+
cin>>year;
20+
if(year == 1918) cout<<"26.09.1918";
21+
else if(year == 1700 || year == 1800 || year == 1900)
22+
cout<<"12.09."<<year;
23+
else if(year % 400 == 0)
24+
cout<<"12.09."<<year;
25+
else if(year % 4 == 0)
26+
{
27+
if(year % 100 == 0) cout<<"13.09."<<year;
28+
else cout<<"12.09."<<year;
29+
}
30+
else cout<<"13.09."<<year;
31+
}

0 commit comments

Comments
 (0)