結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー mikoto1357mikoto1357
提出日時 2015-05-22 22:26:12
言語 Java17
(openjdk 17.0.1)
結果
AC  
実行時間 105 ms / 1,000 ms
コード長 420 bytes
コンパイル時間 3,452 ms
使用メモリ 37,556 KB
最終ジャッジ日時 2023-01-24 06:56:24
合計ジャッジ時間 7,846 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
使用メモリ
testcase_00 AC 100 ms
37,156 KB
testcase_01 AC 104 ms
37,360 KB
testcase_02 AC 104 ms
37,472 KB
testcase_03 AC 103 ms
37,504 KB
testcase_04 AC 100 ms
37,364 KB
testcase_05 AC 105 ms
37,556 KB
testcase_06 AC 95 ms
37,492 KB
testcase_07 AC 93 ms
37,348 KB
testcase_08 AC 97 ms
37,536 KB
testcase_09 AC 94 ms
37,312 KB
testcase_10 AC 96 ms
37,428 KB
testcase_11 AC 93 ms
37,392 KB
testcase_12 AC 97 ms
37,240 KB
testcase_13 AC 92 ms
37,344 KB
testcase_14 AC 94 ms
37,556 KB
testcase_15 AC 97 ms
37,288 KB
testcase_16 AC 93 ms
37,432 KB
testcase_17 AC 95 ms
37,344 KB
testcase_18 AC 97 ms
37,440 KB
testcase_19 AC 94 ms
37,484 KB
testcase_20 AC 98 ms
37,508 KB
testcase_21 AC 98 ms
37,380 KB
testcase_22 AC 97 ms
37,376 KB
testcase_23 AC 93 ms
37,340 KB
testcase_24 AC 93 ms
37,168 KB
testcase_25 AC 98 ms
37,288 KB
testcase_26 AC 98 ms
37,476 KB
testcase_27 AC 98 ms
37,512 KB
testcase_28 AC 98 ms
37,456 KB
testcase_29 AC 96 ms
37,468 KB
testcase_30 AC 98 ms
37,272 KB
testcase_31 AC 95 ms
37,468 KB
testcase_32 AC 100 ms
37,388 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Yukicoder211{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int k = scan.nextInt();
		int count = 0;
		int[] sosuu = {2,3,5,7,11,13};
		int[] gousei = {4,6,8,9,10,12};
		int[][] kai = new int[6][6];
		for(int i = 0;i < 6;i++){
			for(int j = 0;j < 6;j++){
				if(k == sosuu[i] * gousei[j])	count++;
			}
		}
		System.out.println(count / 36.0);
	}
}
0