結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-24 22:06:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 45 ms / 1,000 ms
コード長 641 bytes
コンパイル時間 3,061 ms
コンパイル使用メモリ 71,360 KB
実行使用メモリ 49,552 KB
最終ジャッジ日時 2023-09-08 06:26:51
合計ジャッジ時間 5,738 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 43 ms
49,172 KB
testcase_01 AC 42 ms
49,156 KB
testcase_02 AC 42 ms
49,340 KB
testcase_03 AC 42 ms
49,276 KB
testcase_04 AC 43 ms
49,228 KB
testcase_05 AC 42 ms
49,084 KB
testcase_06 AC 42 ms
49,352 KB
testcase_07 AC 41 ms
48,948 KB
testcase_08 AC 43 ms
49,168 KB
testcase_09 AC 42 ms
49,124 KB
testcase_10 AC 42 ms
49,220 KB
testcase_11 AC 42 ms
49,164 KB
testcase_12 AC 41 ms
49,100 KB
testcase_13 AC 43 ms
49,176 KB
testcase_14 AC 42 ms
49,076 KB
testcase_15 AC 41 ms
49,072 KB
testcase_16 AC 42 ms
49,208 KB
testcase_17 AC 42 ms
49,084 KB
testcase_18 AC 40 ms
49,552 KB
testcase_19 AC 42 ms
48,892 KB
testcase_20 AC 41 ms
49,264 KB
testcase_21 AC 42 ms
49,076 KB
testcase_22 AC 41 ms
48,900 KB
testcase_23 AC 42 ms
49,116 KB
testcase_24 AC 41 ms
49,232 KB
testcase_25 AC 45 ms
49,188 KB
testcase_26 AC 45 ms
49,212 KB
testcase_27 AC 41 ms
48,952 KB
testcase_28 AC 42 ms
49,352 KB
testcase_29 AC 41 ms
49,120 KB
testcase_30 AC 42 ms
49,224 KB
testcase_31 AC 43 ms
49,148 KB
testcase_32 AC 43 ms
49,276 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;

public class No211{
    public static void main(String[] args) throws IOException{
        String str = new BufferedReader(new InputStreamReader(System.in)).readLine();
        int k = Integer.parseInt(str);
        int[] pnd = {2,3,5,7,11,13};
        int[] cnd = {4,6,8,9,10,12};
        int count  = 0;
        for(int i=0; i < 6; i++){
            for(int j=0; j < 6; j++){
                if(pnd[i] * cnd[j] == k){
                    count++;
                    break;
                }
            }
        }
        if(count == 0) System.out.println(0);
        else System.out.println((double)count/36);
    }
}
0