結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー ffmm00ffmm00
提出日時 2015-06-01 17:42:28
言語 Java19
(openjdk 21)
結果
AC  
実行時間 131 ms / 1,000 ms
コード長 393 bytes
コンパイル時間 3,226 ms
コンパイル使用メモリ 73,072 KB
実行使用メモリ 56,228 KB
最終ジャッジ日時 2023-09-08 05:13:27
合計ジャッジ時間 8,726 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,792 KB
testcase_01 AC 124 ms
55,692 KB
testcase_02 AC 125 ms
55,988 KB
testcase_03 AC 122 ms
55,868 KB
testcase_04 AC 125 ms
55,540 KB
testcase_05 AC 123 ms
55,820 KB
testcase_06 AC 131 ms
55,736 KB
testcase_07 AC 123 ms
55,728 KB
testcase_08 AC 124 ms
55,844 KB
testcase_09 AC 123 ms
54,112 KB
testcase_10 AC 125 ms
56,160 KB
testcase_11 AC 124 ms
55,688 KB
testcase_12 AC 122 ms
55,452 KB
testcase_13 AC 125 ms
55,744 KB
testcase_14 AC 121 ms
55,960 KB
testcase_15 AC 122 ms
55,628 KB
testcase_16 AC 122 ms
55,700 KB
testcase_17 AC 123 ms
55,752 KB
testcase_18 AC 122 ms
55,760 KB
testcase_19 AC 122 ms
55,720 KB
testcase_20 AC 122 ms
55,908 KB
testcase_21 AC 124 ms
56,076 KB
testcase_22 AC 124 ms
55,796 KB
testcase_23 AC 124 ms
55,900 KB
testcase_24 AC 124 ms
56,168 KB
testcase_25 AC 122 ms
56,228 KB
testcase_26 AC 124 ms
53,632 KB
testcase_27 AC 126 ms
55,372 KB
testcase_28 AC 125 ms
55,592 KB
testcase_29 AC 124 ms
55,996 KB
testcase_30 AC 123 ms
54,168 KB
testcase_31 AC 122 ms
55,856 KB
testcase_32 AC 124 ms
55,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class N211 {

	public static void main(String[] args) {
		Scanner sca = new Scanner(System.in);
		int K = sca.nextInt();
		int[] so = { 2, 3, 5, 7, 11, 13 };
		int[] go = { 4, 6, 8, 9, 10, 12 };
		int c = 0;

		for (int i = 0; i < 6; i++) {
			for (int j = 0; j < 6; j++) {
				if (so[i] * go[j] == K)
					c++;
			}
		}

		System.out.println(c / 36.0);
	}

}
0