結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー uafr_csuafr_cs
提出日時 2015-05-24 20:29:02
言語 Java21
(openjdk 21)
結果
RE  
実行時間 -
コード長 451 bytes
コンパイル時間 3,973 ms
コンパイル使用メモリ 72,892 KB
実行使用メモリ 57,820 KB
最終ジャッジ日時 2023-09-20 12:46:55
合計ジャッジ時間 9,629 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
55,924 KB
testcase_01 AC 128 ms
56,184 KB
testcase_02 AC 127 ms
55,792 KB
testcase_03 AC 129 ms
56,008 KB
testcase_04 AC 128 ms
56,116 KB
testcase_05 AC 130 ms
55,580 KB
testcase_06 RE -
testcase_07 RE -
testcase_08 AC 132 ms
55,776 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 130 ms
55,692 KB
testcase_12 AC 130 ms
56,148 KB
testcase_13 AC 129 ms
54,048 KB
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 129 ms
55,872 KB
testcase_17 AC 129 ms
55,956 KB
testcase_18 AC 131 ms
55,876 KB
testcase_19 AC 129 ms
56,008 KB
testcase_20 AC 129 ms
55,580 KB
testcase_21 AC 129 ms
55,532 KB
testcase_22 AC 129 ms
55,944 KB
testcase_23 AC 129 ms
56,052 KB
testcase_24 AC 129 ms
55,888 KB
testcase_25 AC 128 ms
55,992 KB
testcase_26 RE -
testcase_27 AC 128 ms
55,872 KB
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 AC 130 ms
55,576 KB
testcase_32 AC 131 ms
55,796 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