結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー dazydazy
提出日時 2017-02-23 19:40:11
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 618 bytes
コンパイル時間 3,187 ms
コンパイル使用メモリ 72,588 KB
実行使用メモリ 58,356 KB
最終ジャッジ日時 2023-08-30 21:34:34
合計ジャッジ時間 8,459 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,636 KB
testcase_01 AC 119 ms
55,804 KB
testcase_02 WA -
testcase_03 AC 118 ms
55,628 KB
testcase_04 AC 120 ms
55,696 KB
testcase_05 AC 122 ms
55,668 KB
testcase_06 AC 120 ms
55,556 KB
testcase_07 AC 119 ms
55,840 KB
testcase_08 WA -
testcase_09 AC 119 ms
55,792 KB
testcase_10 AC 119 ms
55,668 KB
testcase_11 AC 119 ms
55,864 KB
testcase_12 AC 122 ms
55,868 KB
testcase_13 AC 120 ms
55,956 KB
testcase_14 AC 119 ms
55,804 KB
testcase_15 AC 121 ms
55,488 KB
testcase_16 AC 120 ms
55,644 KB
testcase_17 WA -
testcase_18 AC 119 ms
55,976 KB
testcase_19 AC 119 ms
56,332 KB
testcase_20 AC 118 ms
55,436 KB
testcase_21 AC 119 ms
55,968 KB
testcase_22 AC 120 ms
55,964 KB
testcase_23 AC 125 ms
55,884 KB
testcase_24 AC 118 ms
55,904 KB
testcase_25 AC 119 ms
55,704 KB
testcase_26 AC 119 ms
53,452 KB
testcase_27 AC 119 ms
55,668 KB
testcase_28 AC 119 ms
55,476 KB
testcase_29 AC 119 ms
56,044 KB
testcase_30 AC 119 ms
56,048 KB
testcase_31 AC 119 ms
55,672 KB
testcase_32 AC 118 ms
55,932 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Run {
    public static void main (String arg[]) {
        Scanner scan = new Scanner(System.in);
        double ans = 0.0;
        int [] array1 = {2, 3, 5, 7, 11, 13};
        int [] array2 = {4, 6, 8, 9, 10, 12};
        ArrayList<Integer> A = new ArrayList<>();
        for (int i = 0; i < array1.length; i++) {
            for (int j = 0; j < array2.length; j++) {
                A.add(array1[i] * array2[j]);
            }
        }
        int K = scan.nextInt();
        if (A.contains(K)) ans = 1.0 / (array1.length * array2.length);
        System.out.println(ans);
    }
}
0