結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー spaciaspacia
提出日時 2015-12-23 14:03:00
言語 Java21
(openjdk 21)
結果
AC  
実行時間 44 ms / 1,000 ms
コード長 548 bytes
コンパイル時間 1,839 ms
コンパイル使用メモリ 71,780 KB
実行使用メモリ 51,152 KB
最終ジャッジ日時 2023-09-08 05:32:49
合計ジャッジ時間 4,451 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 42 ms
49,148 KB
testcase_01 AC 41 ms
49,156 KB
testcase_02 AC 42 ms
51,152 KB
testcase_03 AC 42 ms
49,432 KB
testcase_04 AC 41 ms
49,280 KB
testcase_05 AC 40 ms
49,172 KB
testcase_06 AC 42 ms
49,288 KB
testcase_07 AC 42 ms
49,188 KB
testcase_08 AC 40 ms
49,228 KB
testcase_09 AC 41 ms
49,264 KB
testcase_10 AC 41 ms
47,596 KB
testcase_11 AC 42 ms
49,316 KB
testcase_12 AC 42 ms
49,292 KB
testcase_13 AC 42 ms
49,252 KB
testcase_14 AC 42 ms
49,356 KB
testcase_15 AC 41 ms
49,368 KB
testcase_16 AC 40 ms
49,372 KB
testcase_17 AC 39 ms
49,276 KB
testcase_18 AC 41 ms
47,608 KB
testcase_19 AC 41 ms
49,516 KB
testcase_20 AC 42 ms
49,356 KB
testcase_21 AC 41 ms
49,368 KB
testcase_22 AC 41 ms
49,076 KB
testcase_23 AC 41 ms
49,324 KB
testcase_24 AC 42 ms
49,284 KB
testcase_25 AC 41 ms
49,268 KB
testcase_26 AC 41 ms
49,564 KB
testcase_27 AC 42 ms
49,292 KB
testcase_28 AC 40 ms
49,300 KB
testcase_29 AC 42 ms
49,076 KB
testcase_30 AC 44 ms
49,316 KB
testcase_31 AC 42 ms
49,792 KB
testcase_32 AC 42 ms
49,288 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;

class Main211 {
	
	public static void out (Object o) {
		System.out.println(o);
	}
	
	public static void main (String[] args) throws IOException {
		BufferedReader br = 
			new BufferedReader(new InputStreamReader(System.in));
		
		int k = Integer.parseInt(br.readLine());
		int max = 200;
		int[] sum = new int[max + 1];
		int[] dice1 = {2,3,5,7,11,13};
		int[] dice2 = {4,6,8,9,10,12};
		
		for (int d1 : dice1) {
			for (int d2 : dice2) {
				sum[d1 * d2]++;
			}
		}
		
		out((double)sum[k] / 36);
		
	}
}
0