結果

問題 No.405 ローマ数字の腕時計
ユーザー r2en_
提出日時 2017-07-05 11:09:51
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 387 bytes
コンパイル時間 630 ms
コンパイル使用メモリ 65,216 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 19:12:04
合計ジャッジ時間 1,322 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
using namespace std;
#define rep(i,n) for(int i = 0; i < (n); i++)

int main(){
    char s1[12][5] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
    string s; cin >> s;
    int t = 0; cin >> t;
    int mod = 0;
    rep(i,12){
        if(s == s1[i]) mod = i;
    }
    mod += t + 1200;
    mod %= 12;
    cout << s1[mod] << endl;
    return 0;
}
0