結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー HEGO55HEGO55
提出日時 2017-05-27 14:11:34
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 426 bytes
コンパイル時間 2,379 ms
コンパイル使用メモリ 83,496 KB
実行使用メモリ 57,620 KB
最終ジャッジ日時 2023-10-21 13:19:37
合計ジャッジ時間 8,641 ms
ジャッジサーバーID
(参考情報)
judge10 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 142 ms
57,264 KB
testcase_01 AC 140 ms
55,264 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 140 ms
57,096 KB
testcase_07 AC 141 ms
57,360 KB
testcase_08 WA -
testcase_09 AC 141 ms
57,376 KB
testcase_10 AC 140 ms
57,316 KB
testcase_11 WA -
testcase_12 AC 143 ms
57,380 KB
testcase_13 AC 142 ms
57,068 KB
testcase_14 AC 140 ms
57,456 KB
testcase_15 AC 141 ms
57,392 KB
testcase_16 AC 139 ms
57,416 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 142 ms
57,096 KB
testcase_20 AC 141 ms
57,312 KB
testcase_21 AC 142 ms
57,416 KB
testcase_22 AC 140 ms
57,332 KB
testcase_23 AC 141 ms
57,420 KB
testcase_24 AC 142 ms
57,444 KB
testcase_25 AC 142 ms
55,452 KB
testcase_26 AC 142 ms
57,324 KB
testcase_27 AC 142 ms
57,388 KB
testcase_28 AC 144 ms
57,312 KB
testcase_29 AC 142 ms
57,324 KB
testcase_30 AC 143 ms
57,352 KB
testcase_31 AC 145 ms
57,096 KB
testcase_32 AC 145 ms
57,620 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
class No211{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		
		int[] sosu = {2,3,5,7,11,13};
		int[] gose = {4,6,8,9,10,12};
		int K = sc.nextInt();
		int count = 0;
		
		for(int i=0; i<sosu.length; i++){
			for(int k=0; k<gose.length; k++){
				if(sosu[i]*gose[i] == K){
					count++;
				}
			}
		}
		
		System.out.println(String.format("%.12f",(double)count/36));
	}
}
0