結果

問題 No.405 ローマ数字の腕時計
ユーザー kya_skikya_ski
提出日時 2020-04-20 21:33:00
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 546 bytes
コンパイル時間 2,909 ms
コンパイル使用メモリ 175,516 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-04-16 00:54:47
合計ジャッジ時間 3,039 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
5,376 KB
testcase_04 AC 2 ms
5,376 KB
testcase_05 AC 2 ms
5,376 KB
testcase_06 AC 2 ms
5,376 KB
testcase_07 AC 2 ms
5,376 KB
testcase_08 AC 2 ms
5,376 KB
testcase_09 AC 2 ms
5,376 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 2 ms
5,376 KB
testcase_13 AC 2 ms
5,376 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 2 ms
5,376 KB
testcase_17 AC 2 ms
5,376 KB
testcase_18 AC 2 ms
5,376 KB
testcase_19 AC 2 ms
5,376 KB
testcase_20 WA -
testcase_21 AC 2 ms
5,376 KB
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 AC 2 ms
5,376 KB
testcase_26 AC 2 ms
5,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main() {
    string s;
    int t;
    cin >> s >> t;
    map<string, int> mp;
    mp["I"] = 1;
    mp["II"] = 2;
    mp["III"] = 3;
    mp["IIII"] = 4;
    mp["V"] = 5;
    mp["VI"] = 6;
    mp["VII"] = 7;
    mp["VIII"] = 8;
    mp["IX"] = 9;
    mp["X"] = 10;
    mp["XI"] = 11;
    mp["XII"] = 12;
    
    int now = mp[s];
    now += (t + 2400) % 12;
    
    for (const auto &e : mp) {
        if (e.second == now) {
            cout << e.first << '\n';
        }
    }
    
    return 0;
}
0