Submission #00094
ソースコード
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #include<bits/stdc++.h> using namespace std; #define lol long long #define INF INT_MAX #define P pair<int,int> #define fi first #define se second #define mp(f,s) make_pair(f,s) // const int mod = (1e9) + 7; const int mod = 998244353; int main(){ int e,y; cin>>e>>y; if (e == 0){ if (y < 1912){ cout<< "M" <<y-1867<< "\n" ; } else if (y < 1926){ cout<< "T" <<y-1911<< "\n" ; } else if (y < 1989){ cout<< "S" <<y-1925<< "\n" ; } else { cout<< "H" <<y-1988<< "\n" ; } } else { if (e == 1){ cout<<1867 + y<< "\n" ; } else if (e == 2){ cout<<1911 + y<< "\n" ; } else if (e == 3){ cout<<1925 + y<< "\n" ; } else { cout<<1988 + y<< "\n" ; } } return (0); } |
ステータス
項目 | データ |
---|---|
問題 | 0004 - 日本の暦 |
ユーザー名 | ei2007 |
投稿日時 | 2022-07-19 17:12:31 |
言語 | C++17 |
状態 | Accepted |
得点 | 4 |
ソースコード長 | 850 Byte |
最大実行時間 | 27 ms |
最大メモリ使用量 | 708 KB |
セット
セット | 得点 | Cases | |
---|---|---|---|
1 | ALL | 4 / 4 | * |
テストケース
ファイル名 | 状態 | 実行時間 | メモリ使用量 | # |
---|---|---|---|---|
in01.txt | AC | 21 ms | 604 KB |
1
|
in02.txt | AC | 17 ms | 708 KB |
1
|
in03.txt | AC | 20 ms | 556 KB |
1
|
in04.txt | AC | 19 ms | 648 KB |
1
|
in05.txt | AC | 24 ms | 624 KB |
1
|
in06.txt | AC | 16 ms | 596 KB |
1
|
in07.txt | AC | 17 ms | 560 KB |
1
|
in08.txt | AC | 24 ms | 528 KB |
1
|
in09.txt | AC | 23 ms | 376 KB |
1
|
in10.txt | AC | 21 ms | 480 KB |
1
|
in11.txt | AC | 19 ms | 580 KB |
1
|
in12.txt | AC | 19 ms | 672 KB |
1
|
in13.txt | AC | 18 ms | 644 KB |
1
|
in14.txt | AC | 17 ms | 484 KB |
1
|
in15.txt | AC | 20 ms | 584 KB |
1
|
in16.txt | AC | 24 ms | 684 KB |
1
|
in17.txt | AC | 19 ms | 656 KB |
1
|
in18.txt | AC | 25 ms | 632 KB |
1
|
in19.txt | AC | 24 ms | 600 KB |
1
|
in20.txt | AC | 15 ms | 576 KB |
1
|
in21.txt | AC | 22 ms | 544 KB |
1
|
in22.txt | AC | 27 ms | 644 KB |
1
|
in23.txt | AC | 15 ms | 484 KB |
1
|
in24.txt | AC | 20 ms | 584 KB |
1
|
in25.txt | AC | 15 ms | 428 KB |
1
|