結果

問題 No.405 ローマ数字の腕時計
ユーザー YukimotoPGYukimotoPG
提出日時 2019-02-13 18:09:22
言語 Java21
(openjdk 21)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 2,178 ms
コンパイル使用メモリ 70,916 KB
実行使用メモリ 55,960 KB
最終ジャッジ日時 2023-09-21 00:37:49
合計ジャッジ時間 6,859 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,772 KB
testcase_01 AC 123 ms
55,716 KB
testcase_02 AC 122 ms
55,804 KB
testcase_03 AC 126 ms
55,632 KB
testcase_04 AC 126 ms
55,528 KB
testcase_05 AC 123 ms
55,960 KB
testcase_06 AC 121 ms
55,780 KB
testcase_07 AC 124 ms
55,380 KB
testcase_08 AC 127 ms
55,384 KB
testcase_09 AC 126 ms
55,608 KB
testcase_10 AC 124 ms
55,864 KB
testcase_11 AC 127 ms
55,628 KB
testcase_12 AC 124 ms
55,864 KB
testcase_13 AC 124 ms
55,504 KB
testcase_14 AC 124 ms
55,436 KB
testcase_15 AC 122 ms
55,712 KB
testcase_16 AC 121 ms
55,712 KB
testcase_17 AC 126 ms
55,728 KB
testcase_18 AC 122 ms
55,396 KB
testcase_19 AC 124 ms
55,708 KB
testcase_20 AC 125 ms
55,836 KB
testcase_21 AC 125 ms
55,624 KB
testcase_22 AC 135 ms
55,344 KB
testcase_23 AC 126 ms
55,620 KB
testcase_24 AC 122 ms
55,940 KB
testcase_25 AC 123 ms
55,852 KB
testcase_26 AC 129 ms
55,636 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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