結果
| 問題 |
No.405 ローマ数字の腕時計
|
| コンテスト | |
| ユーザー |
かぼちゃ
|
| 提出日時 | 2018-03-26 23:42:27 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 440 bytes |
| コンパイル時間 | 516 ms |
| コンパイル使用メモリ | 64,108 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 19:16:56 |
| 合計ジャッジ時間 | 1,187 ms |
|
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
vector<string> list = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
string s;
int t,now = 0;
cin >> s >> t;
for(int i = 0;i < 12;i++){
if(s == list[i])now = i + 1;
}
now += t;
now %= 12;
now += now <= 0 ? 12 : 0;
cout << list[now - 1] << endl;
return 0;
}
かぼちゃ