結果

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

ソースコード

diff #

#define _USE_MATH_DEFINES
#include <cstdio>
#include <iostream>
#include <sstream>
#include <fstream>
#include <iomanip>
#include <algorithm>
#include <cmath>
#include <complex>
#include <string>
#include <vector>
#include <list>
#include <queue>
#include <stack>
#include <set>
#include <map>
#include <bitset>
#include <numeric>
#include <limits>
#include <climits>
#include <cfloat>
#include <functional>
#include <iterator>
using namespace std;

const vector<string> roma = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};

int main()
{
    string s;
    int t;
    cin >> s >> t;

    t += find(roma.begin(), roma.end(), s) - roma.begin();
    t %= 12;
    t += 12;
    t %= 12;
    cout << roma[t] << endl;

    return 0;
}
0