結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー GrenacheGrenache
提出日時 2015-05-22 22:24:18
言語 Java19
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 441 bytes
コンパイル時間 3,802 ms
コンパイル使用メモリ 71,616 KB
実行使用メモリ 57,884 KB
最終ジャッジ日時 2023-09-08 04:57:54
合計ジャッジ時間 8,829 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
55,672 KB
testcase_01 AC 122 ms
55,892 KB
testcase_02 AC 123 ms
55,976 KB
testcase_03 AC 123 ms
56,044 KB
testcase_04 AC 121 ms
55,996 KB
testcase_05 AC 122 ms
55,936 KB
testcase_06 AC 124 ms
56,148 KB
testcase_07 AC 122 ms
56,304 KB
testcase_08 AC 123 ms
55,872 KB
testcase_09 AC 124 ms
55,864 KB
testcase_10 AC 123 ms
56,020 KB
testcase_11 AC 124 ms
53,992 KB
testcase_12 AC 123 ms
55,844 KB
testcase_13 AC 122 ms
56,032 KB
testcase_14 AC 123 ms
55,460 KB
testcase_15 AC 124 ms
56,104 KB
testcase_16 AC 123 ms
55,828 KB
testcase_17 AC 126 ms
55,856 KB
testcase_18 AC 125 ms
57,884 KB
testcase_19 AC 122 ms
55,884 KB
testcase_20 AC 124 ms
55,452 KB
testcase_21 AC 123 ms
55,884 KB
testcase_22 AC 123 ms
56,192 KB
testcase_23 AC 125 ms
56,144 KB
testcase_24 AC 126 ms
55,932 KB
testcase_25 AC 122 ms
55,904 KB
testcase_26 AC 127 ms
57,568 KB
testcase_27 AC 124 ms
55,492 KB
testcase_28 AC 125 ms
56,120 KB
testcase_29 AC 125 ms
53,896 KB
testcase_30 AC 123 ms
55,824 KB
testcase_31 AC 124 ms
55,820 KB
testcase_32 AC 123 ms
55,628 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main_yukicoder211 {
	
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int k = sc.nextInt();

		int[] d1 = {2, 3, 5, 7, 11, 13};
		int[] d2 = {4, 6, 8, 9, 10, 12};

		int ret = 0;
		for (int i = 0; i < 6; i++) {
			for (int j = 0; j < 6; j++) {
				if ((d1[i] * d2[j]) == k) {
					ret++;
				}
			}
		}
		
		System.out.println((double)ret / 36);
		sc.close();
	}
}
0