結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー tentententen
提出日時 2020-11-11 08:35:41
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 508 bytes
コンパイル時間 3,456 ms
コンパイル使用メモリ 71,968 KB
実行使用メモリ 57,612 KB
最終ジャッジ日時 2023-09-30 00:21:46
合計ジャッジ時間 9,202 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 112 ms
56,200 KB
testcase_01 AC 120 ms
55,568 KB
testcase_02 AC 127 ms
55,808 KB
testcase_03 AC 104 ms
55,844 KB
testcase_04 AC 107 ms
55,484 KB
testcase_05 AC 108 ms
55,688 KB
testcase_06 AC 112 ms
56,576 KB
testcase_07 AC 116 ms
55,700 KB
testcase_08 AC 119 ms
57,612 KB
testcase_09 AC 118 ms
55,632 KB
testcase_10 AC 114 ms
55,952 KB
testcase_11 AC 117 ms
56,092 KB
testcase_12 AC 117 ms
53,732 KB
testcase_13 AC 114 ms
56,224 KB
testcase_14 AC 110 ms
55,904 KB
testcase_15 AC 110 ms
55,712 KB
testcase_16 AC 108 ms
55,880 KB
testcase_17 AC 116 ms
55,700 KB
testcase_18 AC 113 ms
55,388 KB
testcase_19 AC 118 ms
55,544 KB
testcase_20 AC 115 ms
55,364 KB
testcase_21 AC 118 ms
55,784 KB
testcase_22 AC 115 ms
55,992 KB
testcase_23 AC 120 ms
55,404 KB
testcase_24 AC 112 ms
55,740 KB
testcase_25 AC 115 ms
56,060 KB
testcase_26 AC 115 ms
56,004 KB
testcase_27 AC 118 ms
55,608 KB
testcase_28 AC 118 ms
55,708 KB
testcase_29 AC 116 ms
55,600 KB
testcase_30 AC 114 ms
55,696 KB
testcase_31 AC 115 ms
55,572 KB
testcase_32 AC 115 ms
55,684 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int k = sc.nextInt();
        double[] ans = new double[201];
        int[] dice1 = new int[]{2, 3, 5, 7, 11, 13};
        int[] dice2 = new int[]{4, 6, 8, 9, 10, 12};
        for (int i = 0; i < 6; i++) {
            for (int j = 0; j < 6; j++) {
                ans[dice1[i] * dice2[j]] += 1.0 / 36;
            }
        }
        System.out.println(ans[k]);
    }
}
0