結果

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

ソースコード

diff #

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

typedef long long ll;
#define rep(i,n) for(int (i)=0;(i)<(int)(n);++(i))
#define each(itr,c) for(__typeof(c.begin()) itr=c.begin(); itr!=c.end(); ++itr)
#define all(x) (x).begin(),(x).end()
#define mp make_pair
#define pb push_back
#define fi first
#define se second

int main()
{
    string ans[12] = {"XII", "I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IX", "X", "XI"};
    map<string,int> m;
    rep(i,12) m[ans[i]]=i;

    string s;
    int t;
    cin >>s >>t;

    int now=m[s];
    now = (now+t+1200)%12;
    cout << ans[now] << endl;
    return 0;
}
0