結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー ぴろずぴろず
提出日時 2015-05-22 22:21:51
言語 Java19
(openjdk 21)
結果
AC  
実行時間 124 ms / 1,000 ms
コード長 422 bytes
コンパイル時間 4,598 ms
コンパイル使用メモリ 70,424 KB
実行使用メモリ 39,964 KB
最終ジャッジ日時 2023-09-08 04:55:45
合計ジャッジ時間 9,541 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
39,328 KB
testcase_01 AC 116 ms
39,136 KB
testcase_02 AC 120 ms
39,240 KB
testcase_03 AC 120 ms
39,388 KB
testcase_04 AC 120 ms
39,452 KB
testcase_05 AC 119 ms
39,348 KB
testcase_06 AC 123 ms
39,148 KB
testcase_07 AC 119 ms
39,072 KB
testcase_08 AC 121 ms
39,616 KB
testcase_09 AC 119 ms
39,132 KB
testcase_10 AC 120 ms
39,404 KB
testcase_11 AC 117 ms
39,136 KB
testcase_12 AC 118 ms
38,948 KB
testcase_13 AC 121 ms
39,128 KB
testcase_14 AC 117 ms
39,376 KB
testcase_15 AC 119 ms
39,060 KB
testcase_16 AC 120 ms
39,312 KB
testcase_17 AC 121 ms
39,484 KB
testcase_18 AC 122 ms
39,524 KB
testcase_19 AC 123 ms
39,456 KB
testcase_20 AC 123 ms
39,432 KB
testcase_21 AC 119 ms
39,092 KB
testcase_22 AC 119 ms
39,492 KB
testcase_23 AC 124 ms
39,344 KB
testcase_24 AC 118 ms
39,056 KB
testcase_25 AC 119 ms
39,284 KB
testcase_26 AC 123 ms
39,380 KB
testcase_27 AC 123 ms
39,424 KB
testcase_28 AC 119 ms
39,492 KB
testcase_29 AC 120 ms
39,648 KB
testcase_30 AC 119 ms
39,964 KB
testcase_31 AC 122 ms
39,348 KB
testcase_32 AC 122 ms
38,920 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no211;

import java.util.Scanner;

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

}
0