結果

問題 No.405 ローマ数字の腕時計
ユーザー togari_takamoto
提出日時 2016-08-05 22:25:21
言語 C++11(廃止可能性あり)
(gcc 13.3.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 438 bytes
コンパイル時間 1,287 ms
コンパイル使用メモリ 162,692 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-07-06 18:57:36
合計ジャッジ時間 2,063 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
using ll = long long;
#define REP(i,n) for(ll i = 0; i < (n); ++i)
int main() {
	cin.tie(0);
	ios_base::sync_with_stdio(false);
	cout << fixed << setprecision(50);
	string s; ll n;
	cin >> s >> n;
	vector<string> x = { "I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII" };
	REP(i, x.size()) if (x[i] == s) {
		cout << x[((i + n) % 12 + 12) % 12] << endl;
		break;
	}
	return 0;
}
0