結果
| 問題 |
No.405 ローマ数字の腕時計
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2019-07-27 19:20:57 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 360 bytes |
| コンパイル時間 | 2,247 ms |
| コンパイル使用メモリ | 201,216 KB |
| 最終ジャッジ日時 | 2025-01-07 09:39:46 |
|
ジャッジサーバーID (参考情報) |
judge5 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
string itor[12] = { "I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII" };
map<string, int> rtoi;
for (int i = 0; i < 12; i++) rtoi[itor[i]] = i;
string s; int t;
cin >> s >> t;
cout << itor[(rtoi[s] + t + 1200) % 12] << endl;
return 0;
}