結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー r.suzukir.suzuki
提出日時 2015-12-13 18:32:52
言語 Java19
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 442 bytes
コンパイル時間 5,334 ms
コンパイル使用メモリ 71,780 KB
実行使用メモリ 56,196 KB
最終ジャッジ日時 2023-09-08 05:32:17
合計ジャッジ時間 9,042 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,732 KB
testcase_01 AC 117 ms
56,196 KB
testcase_02 AC 123 ms
55,420 KB
testcase_03 AC 117 ms
55,728 KB
testcase_04 AC 116 ms
55,808 KB
testcase_05 AC 116 ms
55,728 KB
testcase_06 AC 117 ms
55,844 KB
testcase_07 AC 117 ms
55,940 KB
testcase_08 AC 119 ms
53,836 KB
testcase_09 AC 117 ms
55,756 KB
testcase_10 AC 119 ms
55,676 KB
testcase_11 AC 119 ms
55,564 KB
testcase_12 AC 120 ms
55,728 KB
testcase_13 AC 122 ms
55,604 KB
testcase_14 AC 121 ms
55,868 KB
testcase_15 AC 127 ms
56,028 KB
testcase_16 AC 120 ms
55,636 KB
testcase_17 AC 118 ms
55,788 KB
testcase_18 AC 116 ms
55,632 KB
testcase_19 AC 115 ms
55,612 KB
testcase_20 AC 119 ms
55,844 KB
testcase_21 AC 119 ms
55,744 KB
testcase_22 AC 119 ms
55,940 KB
testcase_23 AC 121 ms
55,908 KB
testcase_24 AC 116 ms
55,724 KB
testcase_25 AC 115 ms
55,572 KB
testcase_26 AC 116 ms
56,040 KB
testcase_27 AC 119 ms
55,908 KB
testcase_28 AC 119 ms
55,756 KB
testcase_29 AC 124 ms
55,624 KB
testcase_30 AC 119 ms
55,648 KB
testcase_31 AC 115 ms
55,636 KB
testcase_32 AC 116 ms
55,804 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

public class No_211 {

	public static void main(String[] args) {
		java.util.Scanner sc = new java.util.Scanner(System.in);
		int num = sc.nextInt();
		sc.close();
		int[] sosu = { 2, 3, 5, 7, 11, 13 };
		int[] gosei = { 4, 6, 8, 9, 10, 12 };
		int count = 0;

		for (int i = 0; i < 6; i++) {
			for (int j = 0; j < 6; j++) {
				if (num == sosu[i] * gosei[j]) {
					count++;
				}
			}
		}

		System.out.println((double) count / 36);

	}

}
0