結果
問題 |
No.405 ローマ数字の腕時計
|
ユーザー |
|
提出日時 | 2019-08-31 22:47:47 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 600 bytes |
コンパイル時間 | 1,730 ms |
コンパイル使用メモリ | 169,892 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 19:24:08 |
合計ジャッジ時間 | 2,132 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
/** @file 405.cpp @title No.405 ローマ数字の腕時計 - yukicoder @url https://yukicoder.me/problems/no/405 **/ #include <bits/stdc++.h> using namespace std; typedef long long LL; #define ALL(obj) (obj).begin(), (obj).end() #define REP(i, N) for (int i = 0; i < (N); ++i) int main() { string S; int T; cin >> S >> T; while (T < 0) { T += 12; } vector<string> rome = {"I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IX", "X", "XI", "XII"}; REP(i, (int)rome.size()) { if (S == rome[i]) { cout << rome[((i + T) % 12)] << endl; } } return 0; }