結果

問題 No.405 ローマ数字の腕時計
ユーザー cowgirlcowgirl
提出日時 2018-12-14 13:13:23
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
WA  
実行時間 -
コード長 579 bytes
コンパイル時間 1,665 ms
コンパイル使用メモリ 168,692 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-25 09:58:00
合計ジャッジ時間 2,933 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 2 ms
4,352 KB
testcase_06 WA -
testcase_07 AC 2 ms
4,352 KB
testcase_08 AC 2 ms
4,352 KB
testcase_09 AC 2 ms
4,352 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 AC 2 ms
4,352 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 2 ms
4,352 KB
testcase_20 WA -
testcase_21 AC 2 ms
4,352 KB
testcase_22 WA -
testcase_23 AC 2 ms
4,352 KB
testcase_24 AC 2 ms
4,352 KB
testcase_25 WA -
testcase_26 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
const double EPS = 1e-9;
typedef vector<int> vint;
typedef pair<int, int> pint;
#define rep(i, n) REP(i, 0, n)
#define ALL(v) v.begin() , v.end()
#define REP(i, x, n) for(int i = x; i < n; i++)


int main(){
    int x, now = 0; string s, t[12] = {
        "XII", "I", "II", "III", "IIII",
        "V", "VI", "VII", "VIII", "IX",
        "X", "XI"};
    cin >> s >> x;
    rep(i, 12){
        if(t[i] == s) now = i;
    }
    if(x < 0) x = 12 - abs(x) % 12;
    else x = x % 12;
    cout << t[now + x] << endl;
}
0