結果
問題 |
No.405 ローマ数字の腕時計
|
ユーザー |
![]() |
提出日時 | 2023-11-21 14:55:48 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
WA
|
実行時間 | - |
コード長 | 589 bytes |
コンパイル時間 | 2,327 ms |
コンパイル使用メモリ | 208,352 KB |
最終ジャッジ日時 | 2025-02-17 22:43:16 |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 21 WA * 6 |
ソースコード
// #define _GLIBCXX_DEBUG #include <bits/stdc++.h> using namespace std; #define rep(i, n) for (int i = 0; i < (int)(n); ++i) int main() { // Input string S1; int T; cin >> S1 >> T; // Make List map<string, int> hour = { {"I", 1}, {"II", 2}, {"III", 3}, {"IIII", 4}, {"V", 5}, {"VI", 6}, {"VII", 7}, {"VIII", 8}, {"IX", 9}, {"X", 10},{"XI", 11}, {"XII", 12} }; map<int, string> deHour; for (const auto& [t, h] : hour) deHour[h] = t; // Output int ans = ((hour[S1] + T) % 12 + 12) % 12; cout << deHour[ans] << endl; }