結果

問題 No.405 ローマ数字の腕時計
ユーザー tentententen
提出日時 2020-11-11 14:47:14
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 527 bytes
コンパイル時間 4,883 ms
コンパイル使用メモリ 71,972 KB
実行使用メモリ 56,312 KB
最終ジャッジ日時 2023-09-30 00:32:13
合計ジャッジ時間 8,494 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,748 KB
testcase_01 AC 118 ms
55,904 KB
testcase_02 AC 119 ms
56,124 KB
testcase_03 AC 116 ms
55,812 KB
testcase_04 AC 117 ms
55,796 KB
testcase_05 AC 117 ms
56,240 KB
testcase_06 AC 117 ms
55,900 KB
testcase_07 AC 116 ms
56,092 KB
testcase_08 AC 117 ms
54,692 KB
testcase_09 AC 115 ms
55,888 KB
testcase_10 AC 119 ms
56,284 KB
testcase_11 AC 117 ms
55,904 KB
testcase_12 AC 118 ms
56,184 KB
testcase_13 AC 118 ms
55,776 KB
testcase_14 AC 117 ms
56,268 KB
testcase_15 AC 118 ms
55,908 KB
testcase_16 AC 119 ms
55,588 KB
testcase_17 AC 118 ms
55,864 KB
testcase_18 AC 116 ms
55,908 KB
testcase_19 AC 116 ms
55,860 KB
testcase_20 AC 117 ms
55,944 KB
testcase_21 AC 117 ms
55,604 KB
testcase_22 RE -
testcase_23 AC 117 ms
55,948 KB
testcase_24 AC 116 ms
55,708 KB
testcase_25 AC 117 ms
56,200 KB
testcase_26 AC 117 ms
55,968 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String current = sc.next();
        String[] romans = new String[]{"XII", "I","II","III","IIII","V","VI","VII","VIII","IX","X","XI"};
        int next = sc.nextInt();
        for (int i = 0; i < romans.length; i++) {
            if (romans[i].equals(current)) {
                System.out.println(romans[(i + next + 12 * 12) % 12]);
                return;
            }
        }
    }
}
0