結果

問題 No.405 ローマ数字の腕時計
ユーザー nullzinenullzine
提出日時 2017-01-25 21:17:22
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 614 bytes
コンパイル時間 2,375 ms
コンパイル使用メモリ 71,760 KB
実行使用メモリ 56,456 KB
最終ジャッジ日時 2023-08-25 18:25:13
合計ジャッジ時間 5,897 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
55,700 KB
testcase_01 AC 110 ms
55,696 KB
testcase_02 RE -
testcase_03 AC 108 ms
55,972 KB
testcase_04 AC 118 ms
55,700 KB
testcase_05 AC 119 ms
55,660 KB
testcase_06 AC 115 ms
54,108 KB
testcase_07 AC 114 ms
56,288 KB
testcase_08 AC 113 ms
56,056 KB
testcase_09 AC 107 ms
56,088 KB
testcase_10 AC 105 ms
55,912 KB
testcase_11 AC 106 ms
55,784 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 AC 109 ms
56,120 KB
testcase_20 AC 107 ms
56,456 KB
testcase_21 AC 108 ms
55,924 KB
testcase_22 AC 109 ms
55,788 KB
testcase_23 AC 108 ms
56,276 KB
testcase_24 AC 106 ms
55,804 KB
testcase_25 RE -
testcase_26 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

public class Main {

    public static void main(String[] args){
        new Main().run();
    }

    private void run(){
        String[] clock = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
        String[] strs = new java.util.Scanner(System.in).nextLine().split(" ");
        System.out.println(clock[(search(clock,strs[0])+Integer.parseInt(strs[1]))%clock.length]);
    }

    private int search(String[] clock,String target){
        for(int i=0;i<clock.length;i++){
            if(clock[i].equals(target)){
                return i;
            }
        }
        return -1;
    }

}
0