結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー shinwisteriashinwisteria
提出日時 2018-02-21 22:34:12
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 1,000 ms
コード長 439 bytes
コンパイル時間 3,228 ms
コンパイル使用メモリ 71,424 KB
実行使用メモリ 56,320 KB
最終ジャッジ日時 2023-09-08 06:31:12
合計ジャッジ時間 8,760 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 124 ms
56,040 KB
testcase_01 AC 124 ms
56,320 KB
testcase_02 AC 123 ms
55,732 KB
testcase_03 AC 123 ms
55,864 KB
testcase_04 AC 124 ms
55,584 KB
testcase_05 AC 123 ms
55,988 KB
testcase_06 AC 123 ms
55,768 KB
testcase_07 AC 123 ms
55,676 KB
testcase_08 AC 122 ms
55,692 KB
testcase_09 AC 122 ms
55,704 KB
testcase_10 AC 126 ms
55,572 KB
testcase_11 AC 124 ms
55,576 KB
testcase_12 AC 124 ms
55,880 KB
testcase_13 AC 129 ms
55,700 KB
testcase_14 AC 124 ms
55,936 KB
testcase_15 AC 124 ms
55,628 KB
testcase_16 AC 122 ms
55,848 KB
testcase_17 AC 122 ms
55,444 KB
testcase_18 AC 126 ms
55,620 KB
testcase_19 AC 126 ms
55,704 KB
testcase_20 AC 126 ms
55,420 KB
testcase_21 AC 126 ms
55,908 KB
testcase_22 AC 125 ms
55,728 KB
testcase_23 AC 124 ms
55,576 KB
testcase_24 AC 123 ms
55,368 KB
testcase_25 AC 124 ms
55,568 KB
testcase_26 AC 125 ms
55,872 KB
testcase_27 AC 123 ms
55,772 KB
testcase_28 AC 123 ms
55,580 KB
testcase_29 AC 126 ms
55,972 KB
testcase_30 AC 123 ms
55,960 KB
testcase_31 AC 125 ms
55,780 KB
testcase_32 AC 125 ms
55,940 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package m.shin;
import java.util.Scanner;
public class Con211 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int k = s.nextInt() , count = 0;;
		s.close();

		int[] so = {2 , 3 , 5 , 7 , 11 , 13};
		int[] go = {4 , 6 , 8 , 9 , 10 , 12};
		for(int t : so){
			for(int g : go){
				if(t * g == k){
					count++;

				}
			}
		}
		double answer = (double)count / 36;
		System.out.println(answer);

	}

}
0