結果

問題 No.405 ローマ数字の腕時計
ユーザー tenten
提出日時 2020-11-11 14:47:14
言語 Java
(openjdk 23)
結果
RE  
実行時間 -
コード長 527 bytes
コンパイル時間 2,336 ms
コンパイル使用メモリ 74,448 KB
実行使用メモリ 54,308 KB
最終ジャッジ日時 2024-07-22 18:29:53
合計ジャッジ時間 6,929 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 26 RE * 1
権限があれば一括ダウンロードができます

ソースコード

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