結果
| 問題 |
No.405 ローマ数字の腕時計
|
| ユーザー |
|
| 提出日時 | 2016-08-05 22:28:10 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 420 bytes |
| コンパイル時間 | 666 ms |
| コンパイル使用メモリ | 64,936 KB |
| 実行使用メモリ | 5,376 KB |
| 最終ジャッジ日時 | 2024-07-06 18:58:08 |
| 合計ジャッジ時間 | 1,554 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 27 |
ソースコード
#include <algorithm>
#include <iostream>
#include <numeric>
#include <string>
#include <utility>
#include <vector>
int main() {
std::string s1;
std::vector<std::string> nums = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
int t;
std::cin >> s1 >> t;
t += std::find(nums.begin(), nums.end(), s1) - nums.begin() + 1;
t = (t + 1211) % 12;
std::cout << nums[t] << std::endl;
return 0;
}