結果

問題 No.405 ローマ数字の腕時計
ユーザー かぼちゃ
提出日時 2018-03-26 23:40:23
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
WA  
実行時間 -
コード長 439 bytes
コンパイル時間 954 ms
コンパイル使用メモリ 63,964 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-06-25 12:22:40
合計ジャッジ時間 2,203 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 21 WA * 6
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;

int main() {
    vector<string> list = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
    string s;
    int t,now = 0;
    cin >> s >> t;
    for(int i = 0;i < 12;i++){
        if(s == list[i])now = i + 1;
    }
    now += t;
    now %= 12;
    now += now < 0 ? 12 : 0;
    cout << list[now - 1] << endl;
    return 0;
}
0