結果
| 問題 | No.405 ローマ数字の腕時計 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-08-05 22:28:10 |
| 言語 | C++11 (gcc 15.2.0 + boost 1.90.0) |
| 結果 |
AC
|
| 実行時間 | 1 ms / 2,000 ms |
| + 268µs | |
| コード長 | 420 bytes |
| 記録 | |
| コンパイル時間 | 524 ms |
| コンパイル使用メモリ | 83,828 KB |
| 実行使用メモリ | 5,888 KB |
| 最終ジャッジ日時 | 2026-08-10 03:09:22 |
| 合計ジャッジ時間 | 1,949 ms |
|
ジャッジサーバーID (参考情報) |
judge3_1 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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;
}