結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー fal_rndfal_rnd
提出日時 2018-01-21 22:23:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 1,000 ms
コード長 628 bytes
コンパイル時間 2,395 ms
コンパイル使用メモリ 79,172 KB
実行使用メモリ 56,028 KB
最終ジャッジ日時 2023-09-08 06:30:01
合計ジャッジ時間 8,017 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,684 KB
testcase_01 AC 123 ms
55,652 KB
testcase_02 AC 123 ms
55,884 KB
testcase_03 AC 122 ms
55,716 KB
testcase_04 AC 121 ms
55,656 KB
testcase_05 AC 122 ms
55,576 KB
testcase_06 AC 123 ms
55,704 KB
testcase_07 AC 124 ms
55,912 KB
testcase_08 AC 122 ms
55,452 KB
testcase_09 AC 121 ms
55,808 KB
testcase_10 AC 123 ms
56,012 KB
testcase_11 AC 121 ms
55,448 KB
testcase_12 AC 121 ms
55,652 KB
testcase_13 AC 125 ms
55,780 KB
testcase_14 AC 124 ms
55,928 KB
testcase_15 AC 123 ms
56,000 KB
testcase_16 AC 122 ms
55,408 KB
testcase_17 AC 121 ms
55,448 KB
testcase_18 AC 123 ms
55,596 KB
testcase_19 AC 126 ms
55,808 KB
testcase_20 AC 123 ms
56,000 KB
testcase_21 AC 123 ms
55,620 KB
testcase_22 AC 123 ms
55,844 KB
testcase_23 AC 125 ms
55,872 KB
testcase_24 AC 123 ms
55,744 KB
testcase_25 AC 123 ms
55,408 KB
testcase_26 AC 122 ms
55,780 KB
testcase_27 AC 123 ms
55,384 KB
testcase_28 AC 125 ms
55,600 KB
testcase_29 AC 124 ms
55,448 KB
testcase_30 AC 123 ms
56,028 KB
testcase_31 AC 123 ms
55,908 KB
testcase_32 AC 123 ms
55,444 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());}

	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