結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー HEGO55HEGO55
提出日時 2017-05-27 14:01:20
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 416 bytes
コンパイル時間 2,101 ms
コンパイル使用メモリ 74,524 KB
実行使用メモリ 57,760 KB
最終ジャッジ日時 2023-10-21 13:19:27
合計ジャッジ時間 7,840 ms
ジャッジサーバーID
(参考情報)
judge9 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
57,468 KB
testcase_01 AC 118 ms
57,184 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 121 ms
57,400 KB
testcase_07 AC 112 ms
56,244 KB
testcase_08 WA -
testcase_09 AC 122 ms
57,588 KB
testcase_10 AC 125 ms
57,644 KB
testcase_11 WA -
testcase_12 AC 140 ms
57,552 KB
testcase_13 AC 122 ms
57,508 KB
testcase_14 AC 123 ms
57,552 KB
testcase_15 AC 127 ms
57,488 KB
testcase_16 AC 127 ms
57,532 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 111 ms
56,176 KB
testcase_20 AC 112 ms
56,240 KB
testcase_21 AC 123 ms
57,540 KB
testcase_22 AC 118 ms
56,772 KB
testcase_23 AC 122 ms
57,532 KB
testcase_24 AC 129 ms
57,244 KB
testcase_25 AC 124 ms
57,428 KB
testcase_26 AC 121 ms
57,292 KB
testcase_27 AC 121 ms
57,448 KB
testcase_28 AC 123 ms
57,168 KB
testcase_29 AC 120 ms
57,280 KB
testcase_30 AC 121 ms
57,280 KB
testcase_31 AC 122 ms
57,164 KB
testcase_32 AC 122 ms
55,588 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++;
				}
			}
		}
		
		double pro = count/36.;
		System.out.println(pro);
	}
}
0