結果
| 問題 |
No.405 ローマ数字の腕時計
|
| コンテスト | |
| ユーザー |
makonagix
|
| 提出日時 | 2017-01-06 22:11:25 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 945 bytes |
| コンパイル時間 | 543 ms |
| コンパイル使用メモリ | 56,996 KB |
| 実行使用メモリ | 6,824 KB |
| 最終ジャッジ日時 | 2024-12-24 04:17:30 |
| 合計ジャッジ時間 | 1,389 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 12 WA * 15 |
ソースコード
#include <iostream>
#include <string>
using namespace std;
int main() {
string s1;
int s = 0;
int D = 0;
int t;
cin >> s1 >> t;
if (s1 == "I") s = 1;
else if (s1 == "II") s = 2;
else if (s1 == "III") s = 3;
else if (s1 == "IIII") s = 4;
else if (s1 == "V") s = 5;
else if (s1 == "VI") s = 6;
else if (s1 == "VII") s = 7;
else if (s1 == "VIII") s = 8;
else if (s1 == "IX") s = 9;
else if (s1 == "X") s = 10;
else if (s1 == "XI") s = 11;
else if (s1 == "XII") s = 0;
D = (s + t) % 12;
if (D == 1) cout << "I" << endl;
if (D == 2) cout << "II" << endl;
if (D == 3) cout << "III" << endl;
if (D == 4) cout << "IIII" << endl;
if (D == 5) cout << "V" << endl;
if (D == 6) cout << "VI" << endl;
if (D == 7) cout << "VII" << endl;
if (D == 8) cout << "VIII" << endl;
if (D == 9) cout << "IX" << endl;
if (D == 10) cout << "X" << endl;
if (D == 11) cout << "XI" << endl;
if (D == 12) cout << "XII" << endl;
return 0;
}
makonagix