結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー fukuseifukusei
提出日時 2017-05-27 13:59:46
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 487 bytes
コンパイル時間 3,686 ms
コンパイル使用メモリ 74,964 KB
実行使用メモリ 57,764 KB
最終ジャッジ日時 2023-10-21 13:18:05
合計ジャッジ時間 7,975 ms
ジャッジサーバーID
(参考情報)
judge9 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 138 ms
57,652 KB
testcase_01 AC 139 ms
57,500 KB
testcase_02 AC 135 ms
57,672 KB
testcase_03 AC 137 ms
57,684 KB
testcase_04 WA -
testcase_05 AC 138 ms
57,752 KB
testcase_06 AC 139 ms
57,596 KB
testcase_07 AC 137 ms
57,188 KB
testcase_08 AC 138 ms
57,764 KB
testcase_09 AC 138 ms
57,560 KB
testcase_10 AC 136 ms
57,396 KB
testcase_11 AC 138 ms
55,648 KB
testcase_12 AC 135 ms
57,484 KB
testcase_13 AC 137 ms
57,632 KB
testcase_14 AC 138 ms
57,672 KB
testcase_15 AC 139 ms
57,620 KB
testcase_16 AC 140 ms
57,460 KB
testcase_17 AC 138 ms
57,516 KB
testcase_18 AC 140 ms
57,684 KB
testcase_19 AC 137 ms
57,420 KB
testcase_20 AC 139 ms
57,584 KB
testcase_21 AC 136 ms
57,500 KB
testcase_22 AC 136 ms
57,584 KB
testcase_23 AC 138 ms
57,684 KB
testcase_24 AC 138 ms
57,364 KB
testcase_25 AC 137 ms
57,556 KB
testcase_26 AC 137 ms
57,388 KB
testcase_27 AC 135 ms
57,544 KB
testcase_28 AC 134 ms
57,592 KB
testcase_29 AC 134 ms
57,580 KB
testcase_30 AC 138 ms
57,520 KB
testcase_31 AC 136 ms
57,584 KB
testcase_32 AC 137 ms
57,220 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class test{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int K = sc.nextInt();
		int PrimeNumbers[] = {2,3,5,7,11,13}; 
		int SynthesisNumbers[] = {2,4,6,8,10,12};
		int count = 0;
		
		for(int i=0; i<PrimeNumbers.length; i++){
			for(int j=0; j<SynthesisNumbers.length; j++){
				if(PrimeNumbers[i] * SynthesisNumbers[j] == K){
					count++;
				}
			}
		}

		System.out.println(String.format("%.12f", (double)count/36));
		
	}
}
0