結果
問題 |
No.405 ローマ数字の腕時計
|
ユーザー |
|
提出日時 | 2018-02-18 18:38:04 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 410 ms |
コンパイル使用メモリ | 60,596 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-06 19:16:02 |
合計ジャッジ時間 | 1,171 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
#include <iostream> #include <algorithm> #include <string> #include <cstdio> using namespace std; int main() { string s[] = { "XII", "I", "II", "III", "IIII", "V", "VI", "VII", "VIII", "IX", "X", "XI" }; string s1; int T; cin >> s1 >> T; int t = 0; for (int i = 0; i < 12; i++) { if (s[i] == s1) t = i; } t = (t + T + 1200) % 12; cout << s[t] << endl; return 0; }