結果

問題 No.405 ローマ数字の腕時計
ユーザー commy
提出日時 2017-10-14 18:52:03
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 456 bytes
コンパイル時間 763 ms
コンパイル使用メモリ 73,848 KB
実行使用メモリ 6,824 KB
最終ジャッジ日時 2024-11-17 14:47:47
合計ジャッジ時間 1,746 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 20 WA * 7
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <algorithm>
#include <string>

#define REP(i, a, b) for (int i = int(a); i < int(b); i++)

using namespace std;

typedef long long int lli;

int main() {
    string S;
    int T;
    cin >> S >> T;
    T %= 12;
    vector<string> tm = {"I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IV", "X", "XI", "XII"};
    cout << tm[(T + find(begin(tm), end(tm), S) - begin(tm) + 12) % 12] << endl;
    return 0;
}
0