結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー YamaKasaYamaKasa
提出日時 2018-04-27 02:46:07
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 436 bytes
コンパイル時間 2,311 ms
コンパイル使用メモリ 71,488 KB
実行使用メモリ 58,112 KB
最終ジャッジ日時 2023-09-10 06:02:06
合計ジャッジ時間 8,322 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 125 ms
55,496 KB
testcase_01 AC 127 ms
55,944 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 126 ms
56,112 KB
testcase_07 AC 124 ms
55,908 KB
testcase_08 WA -
testcase_09 AC 125 ms
55,716 KB
testcase_10 AC 125 ms
55,904 KB
testcase_11 WA -
testcase_12 AC 125 ms
55,736 KB
testcase_13 AC 125 ms
56,288 KB
testcase_14 AC 123 ms
55,656 KB
testcase_15 AC 124 ms
55,800 KB
testcase_16 AC 125 ms
55,828 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 124 ms
55,788 KB
testcase_20 AC 126 ms
56,104 KB
testcase_21 AC 126 ms
55,492 KB
testcase_22 AC 126 ms
55,656 KB
testcase_23 AC 127 ms
55,716 KB
testcase_24 AC 124 ms
55,660 KB
testcase_25 AC 125 ms
55,828 KB
testcase_26 AC 124 ms
56,060 KB
testcase_27 AC 123 ms
55,952 KB
testcase_28 AC 125 ms
55,624 KB
testcase_29 AC 126 ms
55,708 KB
testcase_30 AC 125 ms
55,760 KB
testcase_31 AC 126 ms
55,648 KB
testcase_32 AC 125 ms
55,908 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 ++;
				}
			}
		}
		float ans = (float) cnt / 36;
		System.out.println(ans);
	}
}
0