結果

問題 No.405 ローマ数字の腕時計
ユーザー RinRin
提出日時 2016-09-02 18:10:45
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 376 bytes
コンパイル時間 3,011 ms
コンパイル使用メモリ 71,524 KB
実行使用メモリ 56,776 KB
最終ジャッジ日時 2023-08-25 18:20:33
合計ジャッジ時間 6,890 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
55,820 KB
testcase_01 AC 114 ms
56,156 KB
testcase_02 RE -
testcase_03 AC 117 ms
56,268 KB
testcase_04 AC 118 ms
56,272 KB
testcase_05 AC 115 ms
54,060 KB
testcase_06 AC 113 ms
56,400 KB
testcase_07 AC 110 ms
56,072 KB
testcase_08 AC 108 ms
55,712 KB
testcase_09 AC 114 ms
56,116 KB
testcase_10 AC 111 ms
56,436 KB
testcase_11 AC 109 ms
56,008 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 113 ms
56,208 KB
testcase_20 AC 113 ms
56,228 KB
testcase_21 AC 108 ms
56,024 KB
testcase_22 AC 110 ms
56,040 KB
testcase_23 AC 113 ms
55,968 KB
testcase_24 AC 112 ms
55,816 KB
testcase_25 RE -
testcase_26 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class b {
	public static void main(String args[]){
		Scanner sc = new Scanner(System.in);
		String foo[] = {"I","II","III","IIII","V","VI","VII","VIII","IX","X","XI","XII"};
		String s = sc.next();
		int t = sc.nextInt();
		int i = 0;
		while(true){
			if(foo[i].equals(s))
				break;
			i++;
		}
		System.out.println(foo[(i + t) % 12]);
	}
}
0