結果

問題 No.405 ローマ数字の腕時計
ユーザー mkawa2
提出日時 2020-01-23 16:07:51
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 2 ms / 2,000 ms
コード長 522 bytes
コンパイル時間 1,539 ms
コンパイル使用メモリ 171,760 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-07-06 19:26:11
合計ジャッジ時間 2,309 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for (int i = 0; i < (n); i++)
using ll = long long;
using vll = vector<ll>;
using vi = vector<int>;
using vvi = vector<vector<int>>;
using vvll = vector<vector<ll>>;
const ll inf = 1e16;
const ll md = 1000000007;

int main() {
  vector<string> roman={"XII","I","II","III","IIII","V","VI","VII","VIII","IX","X","XI"};
  string s;
  int t;
  cin>>s>>t;
  int i=0;
  for(;i<12;i++) if(roman[i]==s) break;
  i=(i+t+1200)%12;
  cout<<roman[i]<<endl;
  return 0;
}
0