結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー YOSHIYOSHI
提出日時 2021-03-06 12:43:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 57 ms / 1,000 ms
コード長 543 bytes
コンパイル時間 3,924 ms
コンパイル使用メモリ 74,852 KB
実行使用メモリ 37,100 KB
最終ジャッジ日時 2024-04-17 01:15:28
合計ジャッジ時間 6,885 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
36,960 KB
testcase_01 AC 56 ms
36,928 KB
testcase_02 AC 55 ms
36,892 KB
testcase_03 AC 56 ms
36,992 KB
testcase_04 AC 56 ms
36,768 KB
testcase_05 AC 57 ms
36,680 KB
testcase_06 AC 56 ms
36,668 KB
testcase_07 AC 55 ms
36,864 KB
testcase_08 AC 57 ms
36,712 KB
testcase_09 AC 55 ms
37,028 KB
testcase_10 AC 55 ms
37,000 KB
testcase_11 AC 56 ms
37,100 KB
testcase_12 AC 54 ms
37,072 KB
testcase_13 AC 56 ms
36,648 KB
testcase_14 AC 57 ms
36,740 KB
testcase_15 AC 56 ms
36,880 KB
testcase_16 AC 57 ms
36,984 KB
testcase_17 AC 56 ms
36,836 KB
testcase_18 AC 55 ms
36,968 KB
testcase_19 AC 55 ms
36,924 KB
testcase_20 AC 57 ms
37,028 KB
testcase_21 AC 57 ms
36,960 KB
testcase_22 AC 57 ms
36,548 KB
testcase_23 AC 56 ms
36,928 KB
testcase_24 AC 55 ms
36,920 KB
testcase_25 AC 55 ms
36,960 KB
testcase_26 AC 55 ms
36,876 KB
testcase_27 AC 56 ms
36,520 KB
testcase_28 AC 56 ms
37,044 KB
testcase_29 AC 55 ms
36,968 KB
testcase_30 AC 57 ms
36,616 KB
testcase_31 AC 56 ms
36,856 KB
testcase_32 AC 55 ms
36,864 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No00000211_Main {

	public static void main(String[] args) throws IOException {

		int[] a = {2,3,5,7,11,13};
		int[] b = {4,6,8,9,10,12};

		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

		int cnt = 0;
		int k = Integer.parseInt(br.readLine());
		for(int i = 0; i < 6; i++) {
			for(int j = 0; j < 6; j++) {
				if(k == a[i] * b[j]) {
					cnt++;
				}
			}
		}
		System.out.println((double)cnt / 36);
	}
}
0