結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー fukuseifukusei
提出日時 2017-05-27 14:01:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 126 ms / 1,000 ms
コード長 486 bytes
コンパイル時間 2,111 ms
コンパイル使用メモリ 71,792 KB
実行使用メモリ 56,344 KB
最終ジャッジ日時 2023-09-08 06:16:58
合計ジャッジ時間 7,476 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
56,004 KB
testcase_01 AC 126 ms
56,100 KB
testcase_02 AC 124 ms
55,616 KB
testcase_03 AC 120 ms
56,336 KB
testcase_04 AC 121 ms
55,776 KB
testcase_05 AC 121 ms
55,876 KB
testcase_06 AC 118 ms
55,844 KB
testcase_07 AC 120 ms
56,164 KB
testcase_08 AC 122 ms
56,232 KB
testcase_09 AC 122 ms
55,564 KB
testcase_10 AC 126 ms
55,732 KB
testcase_11 AC 122 ms
55,788 KB
testcase_12 AC 121 ms
56,064 KB
testcase_13 AC 121 ms
55,724 KB
testcase_14 AC 119 ms
56,224 KB
testcase_15 AC 123 ms
56,024 KB
testcase_16 AC 124 ms
56,264 KB
testcase_17 AC 121 ms
55,616 KB
testcase_18 AC 121 ms
56,344 KB
testcase_19 AC 122 ms
55,888 KB
testcase_20 AC 125 ms
55,896 KB
testcase_21 AC 120 ms
56,084 KB
testcase_22 AC 123 ms
56,292 KB
testcase_23 AC 123 ms
55,468 KB
testcase_24 AC 122 ms
55,568 KB
testcase_25 AC 120 ms
56,144 KB
testcase_26 AC 121 ms
55,596 KB
testcase_27 AC 122 ms
55,604 KB
testcase_28 AC 122 ms
55,972 KB
testcase_29 AC 125 ms
56,116 KB
testcase_30 AC 123 ms
56,156 KB
testcase_31 AC 126 ms
56,340 KB
testcase_32 AC 124 ms
55,948 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[] = {4,6,8,9,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