結果

問題 No.405 ローマ数字の腕時計
ユーザー kekenx
提出日時 2020-03-05 23:05:35
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 373 bytes
コンパイル時間 1,910 ms
コンパイル使用メモリ 175,292 KB
実行使用メモリ 10,496 KB
最終ジャッジ日時 2024-10-14 02:28:51
合計ジャッジ時間 3,008 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23 WA * 3 OLE * 1
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;

int main() {
  string a[12] = {"XII", "I","II","III","IIII","V","VI","VII","VIII","IX","X","XI"};
  map<string, int> m;
  for (int i = 0; i < 12; ++i) {
    m[a[i]] = i;
  }
  string cur; int t;
  cin >> cur >> t;

  int n = m[cur] + t % 12;
  
  cout << (n >= 0? a[n]: a[12 + n]) << '\n';
  return 0;
}
0