結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー mobius_bkstmobius_bkst
提出日時 2015-05-22 22:38:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 1,000 ms
コード長 793 bytes
コンパイル時間 4,229 ms
コンパイル使用メモリ 74,756 KB
実行使用メモリ 49,476 KB
最終ジャッジ日時 2023-09-08 05:05:23
合計ジャッジ時間 5,804 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 44 ms
49,128 KB
testcase_01 AC 41 ms
49,216 KB
testcase_02 AC 43 ms
49,116 KB
testcase_03 AC 42 ms
49,020 KB
testcase_04 AC 42 ms
49,248 KB
testcase_05 AC 43 ms
49,104 KB
testcase_06 AC 43 ms
49,376 KB
testcase_07 AC 43 ms
49,260 KB
testcase_08 AC 45 ms
49,148 KB
testcase_09 AC 44 ms
49,392 KB
testcase_10 AC 44 ms
49,212 KB
testcase_11 AC 44 ms
49,164 KB
testcase_12 AC 43 ms
47,028 KB
testcase_13 AC 43 ms
49,404 KB
testcase_14 AC 44 ms
49,180 KB
testcase_15 AC 45 ms
49,112 KB
testcase_16 AC 43 ms
49,032 KB
testcase_17 AC 43 ms
49,168 KB
testcase_18 AC 43 ms
49,240 KB
testcase_19 AC 43 ms
49,196 KB
testcase_20 AC 43 ms
49,272 KB
testcase_21 AC 41 ms
49,164 KB
testcase_22 AC 42 ms
49,468 KB
testcase_23 AC 42 ms
49,164 KB
testcase_24 AC 40 ms
49,344 KB
testcase_25 AC 41 ms
49,160 KB
testcase_26 AC 40 ms
49,236 KB
testcase_27 AC 45 ms
49,192 KB
testcase_28 AC 43 ms
49,476 KB
testcase_29 AC 43 ms
49,212 KB
testcase_30 AC 41 ms
49,316 KB
testcase_31 AC 41 ms
49,204 KB
testcase_32 AC 41 ms
49,224 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class No211 {
    public static void main(String[] args) {
        try {
            int[] prime = { 2, 3, 5, 7, 11, 13 };
            int[] composite = { 4, 6, 8, 9, 10, 12 };

            BufferedReader br = new BufferedReader(new InputStreamReader(
                    System.in));
            int N = Integer.parseInt(br.readLine());
            int count = 0;
            for (int i : composite) {
                for (int j : prime) {
                    if (i * j == N) {
                        count++;
                    }
                }
            }
            System.out.println(count / 36.0);
        } catch (Exception e) {
            System.err.println("Error:" + e.getMessage());
        }
    }
}
0