結果
問題 |
No.405 ローマ数字の腕時計
|
ユーザー |
![]() |
提出日時 | 2016-08-06 00:48:45 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 457 bytes |
コンパイル時間 | 1,627 ms |
コンパイル使用メモリ | 170,028 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 19:00:50 |
合計ジャッジ時間 | 2,187 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 27 |
ソースコード
#include <bits/stdc++.h> #define REP(i,n) for(int i=0; i<(n); i++) using namespace std; struct cww{cww(){ios::sync_with_stdio(false);cin.tie(0);}}star; int main() { string S; int T; cin >> S >> T; vector<string> vc{"XII","I","II","III","IIII","V","VI","VII","VIII","IX","X","XI"}; int res{}; REP( i, 12 ) { if( S == vc[i] ) { res = i; } } int j = (res+T)%12; cout << ( ( res + T ) % 12 >= 0 ? vc[j] : vc[12+(j)] ) << endl; return 0; }