結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー uafr_csuafr_cs
提出日時 2015-05-24 20:29:02
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 451 bytes
コンパイル時間 3,257 ms
コンパイル使用メモリ 74,824 KB
実行使用メモリ 54,592 KB
最終ジャッジ日時 2024-07-06 08:05:20
合計ジャッジ時間 8,429 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
54,204 KB
testcase_01 AC 135 ms
53,832 KB
testcase_02 AC 135 ms
53,732 KB
testcase_03 AC 136 ms
54,112 KB
testcase_04 AC 135 ms
53,800 KB
testcase_05 AC 136 ms
53,996 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 138 ms
53,812 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 135 ms
54,052 KB
testcase_12 AC 134 ms
53,780 KB
testcase_13 AC 137 ms
53,812 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 134 ms
53,976 KB
testcase_17 AC 135 ms
53,984 KB
testcase_18 AC 136 ms
54,140 KB
testcase_19 AC 136 ms
53,988 KB
testcase_20 AC 136 ms
54,020 KB
testcase_21 AC 137 ms
54,088 KB
testcase_22 AC 137 ms
54,068 KB
testcase_23 AC 136 ms
54,360 KB
testcase_24 AC 136 ms
53,808 KB
testcase_25 AC 136 ms
53,836 KB
testcase_26 RE -
testcase_27 AC 137 ms
53,908 KB
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 136 ms
54,012 KB
testcase_32 AC 136 ms
54,100 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Arrays;
import java.util.LinkedList;
import java.util.Scanner;

public class Main {
	
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		final int K = sc.nextInt();
		
		double[] answer = new double[12 * 13 + 1];
		for(final int p : new int[]{2,3,5,7,11,13}){
			for(final int q : new int[]{4,6,8,9,10,12}){
				answer[p * q] += 1 / 36.0;
			}
		}
		
		System.out.printf("%.14f\n", answer[K]);
	}
	
}
0