結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー YamaKasaYamaKasa
提出日時 2018-04-27 02:47:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 438 bytes
コンパイル時間 2,048 ms
コンパイル使用メモリ 72,028 KB
実行使用メモリ 56,284 KB
最終ジャッジ日時 2023-09-10 06:02:14
合計ジャッジ時間 7,606 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
56,056 KB
testcase_01 AC 124 ms
55,848 KB
testcase_02 AC 125 ms
55,784 KB
testcase_03 AC 123 ms
56,152 KB
testcase_04 AC 126 ms
55,884 KB
testcase_05 AC 124 ms
56,284 KB
testcase_06 AC 123 ms
55,460 KB
testcase_07 AC 123 ms
55,840 KB
testcase_08 AC 124 ms
55,640 KB
testcase_09 AC 125 ms
56,084 KB
testcase_10 AC 124 ms
55,568 KB
testcase_11 AC 125 ms
55,772 KB
testcase_12 AC 126 ms
55,996 KB
testcase_13 AC 125 ms
55,728 KB
testcase_14 AC 125 ms
55,888 KB
testcase_15 AC 124 ms
56,020 KB
testcase_16 AC 125 ms
55,760 KB
testcase_17 AC 125 ms
55,936 KB
testcase_18 AC 123 ms
55,932 KB
testcase_19 AC 125 ms
55,752 KB
testcase_20 AC 127 ms
56,124 KB
testcase_21 AC 122 ms
55,500 KB
testcase_22 AC 123 ms
55,640 KB
testcase_23 AC 124 ms
55,984 KB
testcase_24 AC 124 ms
56,004 KB
testcase_25 AC 122 ms
55,608 KB
testcase_26 AC 123 ms
56,008 KB
testcase_27 AC 123 ms
56,064 KB
testcase_28 AC 127 ms
55,808 KB
testcase_29 AC 123 ms
55,716 KB
testcase_30 AC 124 ms
55,712 KB
testcase_31 AC 124 ms
55,784 KB
testcase_32 AC 124 ms
55,836 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int K = scan.nextInt();
		scan.close();
		int []a = {2, 3, 5, 7, 11, 13};
		int []b = {4, 6, 8, 9, 10, 12};
		int cnt = 0;
		for(int i = 0; i < 6; i++) {
			for(int j = 0; j < 6; j++) {
				if(K == a[i] * b[j]) {
					cnt ++;
				}
			}
		}
		double ans = (double) cnt / 36;
		System.out.println(ans);
	}
}
0