結果

問題 No.405 ローマ数字の腕時計
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 20:12:32
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 556 bytes
コンパイル時間 3,155 ms
コンパイル使用メモリ 71,152 KB
実行使用メモリ 56,888 KB
最終ジャッジ日時 2023-08-25 18:24:37
合計ジャッジ時間 6,965 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 116 ms
55,996 KB
testcase_01 AC 117 ms
56,080 KB
testcase_02 AC 117 ms
56,044 KB
testcase_03 AC 118 ms
56,072 KB
testcase_04 AC 116 ms
56,172 KB
testcase_05 AC 118 ms
55,836 KB
testcase_06 AC 119 ms
56,008 KB
testcase_07 AC 119 ms
55,696 KB
testcase_08 AC 118 ms
56,148 KB
testcase_09 AC 118 ms
56,496 KB
testcase_10 AC 118 ms
56,064 KB
testcase_11 AC 118 ms
55,980 KB
testcase_12 RE -
testcase_13 RE -
testcase_14 AC 119 ms
56,172 KB
testcase_15 AC 118 ms
56,060 KB
testcase_16 AC 118 ms
56,056 KB
testcase_17 AC 117 ms
55,576 KB
testcase_18 AC 119 ms
55,860 KB
testcase_19 AC 121 ms
56,192 KB
testcase_20 AC 120 ms
55,992 KB
testcase_21 AC 120 ms
55,808 KB
testcase_22 AC 119 ms
55,888 KB
testcase_23 AC 118 ms
55,776 KB
testcase_24 AC 119 ms
56,028 KB
testcase_25 RE -
testcase_26 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String S = sc.next();
        int T = sc.nextInt();
        String [] arr = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
        int now = 0;
        for(int i=0; i<12; i++){
            if( S.equals(arr[i]) ){
                now=i;
            }
        }
        T=T%12;
        now=now+T;
        while(now>11){
            now=now-12;
        }
        System.out.println(arr[now]);
    }
}
0