結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー fal_rndfal_rnd
提出日時 2017-08-08 18:09:17
言語 Java21
(openjdk 21)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 738 bytes
コンパイル時間 5,600 ms
コンパイル使用メモリ 77,260 KB
実行使用メモリ 40,068 KB
最終ジャッジ日時 2023-08-26 18:13:51
合計ジャッジ時間 8,007 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
39,524 KB
testcase_01 AC 97 ms
39,692 KB
testcase_02 AC 97 ms
40,068 KB
testcase_03 AC 96 ms
39,164 KB
testcase_04 AC 102 ms
39,496 KB
testcase_05 AC 95 ms
39,120 KB
testcase_06 AC 93 ms
39,240 KB
testcase_07 AC 92 ms
39,152 KB
testcase_08 AC 94 ms
39,496 KB
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 96 ms
39,248 KB
testcase_12 AC 95 ms
38,868 KB
testcase_13 AC 99 ms
39,192 KB
testcase_14 AC 96 ms
39,252 KB
testcase_15 AC 96 ms
39,092 KB
testcase_16 AC 93 ms
38,840 KB
testcase_17 AC 102 ms
38,892 KB
testcase_18 AC 105 ms
39,084 KB
testcase_19 AC 107 ms
39,332 KB
testcase_20 AC 101 ms
39,116 KB
testcase_21 AC 98 ms
39,004 KB
testcase_22 AC 96 ms
38,868 KB
testcase_23 AC 97 ms
38,864 KB
testcase_24 AC 101 ms
39,440 KB
testcase_25 AC 102 ms
39,108 KB
testcase_26 AC 96 ms
39,136 KB
testcase_27 AC 98 ms
39,568 KB
testcase_28 AC 94 ms
38,960 KB
testcase_29 AC 95 ms
38,768 KB
testcase_30 AC 92 ms
39,028 KB
testcase_31 AC 91 ms
39,200 KB
testcase_32 AC 95 ms
39,112 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.util.stream.IntStream;

public class Main{
	static Scanner s=new Scanner(System.in);
	static int getInt(){return Integer.parseInt(s.next());}
	static IntStream REPS(int v){return IntStream.range(0,v);}
	static IntStream REPS(int l,int r){return IntStream.rangeClosed(l,r);}
	static IntStream INS(int n) {return REPS(n).map(i->getInt());}
	static class Pair<T,U>{
		T l;U r;
		Pair(T L,U R){l=L;r=R;}
		T getL(){return l;}
		U getR(){return r;}
	}

	public static void main(String[]$){
		int k=getInt();
		double r[]=new double[13*12+1];
		int[]p={2,3,5,7,11,13},c={4,6,8,9,10,12};
		for(int i=0;i<6;++i)
			for(int j=0;j<6;++j)
				r[p[i]*c[j]]+=1.0/36;
		System.out.println(k<=r.length?r[k]:0);
	}
}
0