結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー 8130Tsk8130Tsk
提出日時 2015-08-06 00:23:45
言語 Java21
(openjdk 21)
結果
AC  
実行時間 127 ms / 1,000 ms
コード長 415 bytes
コンパイル時間 3,766 ms
コンパイル使用メモリ 72,984 KB
実行使用メモリ 57,760 KB
最終ジャッジ日時 2023-09-08 05:19:08
合計ジャッジ時間 8,447 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,536 KB
testcase_01 AC 125 ms
55,876 KB
testcase_02 AC 123 ms
55,844 KB
testcase_03 AC 124 ms
55,680 KB
testcase_04 AC 122 ms
55,740 KB
testcase_05 AC 120 ms
55,960 KB
testcase_06 AC 120 ms
55,812 KB
testcase_07 AC 123 ms
53,776 KB
testcase_08 AC 119 ms
55,780 KB
testcase_09 AC 118 ms
55,516 KB
testcase_10 AC 118 ms
55,876 KB
testcase_11 AC 120 ms
55,940 KB
testcase_12 AC 115 ms
57,760 KB
testcase_13 AC 119 ms
55,832 KB
testcase_14 AC 120 ms
56,344 KB
testcase_15 AC 119 ms
56,296 KB
testcase_16 AC 118 ms
55,500 KB
testcase_17 AC 123 ms
55,596 KB
testcase_18 AC 119 ms
55,676 KB
testcase_19 AC 120 ms
55,788 KB
testcase_20 AC 121 ms
55,836 KB
testcase_21 AC 123 ms
56,440 KB
testcase_22 AC 120 ms
56,436 KB
testcase_23 AC 118 ms
55,780 KB
testcase_24 AC 118 ms
55,932 KB
testcase_25 AC 120 ms
55,552 KB
testcase_26 AC 121 ms
55,956 KB
testcase_27 AC 116 ms
55,948 KB
testcase_28 AC 120 ms
56,028 KB
testcase_29 AC 115 ms
56,116 KB
testcase_30 AC 117 ms
55,944 KB
testcase_31 AC 117 ms
55,832 KB
testcase_32 AC 116 ms
56,120 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No211 {

	public static void main(String[] args) {
		// TODO Auto-generated method stub
		Scanner sc = new Scanner(System.in);
		
		int k = sc.nextInt();
		
		int a[]={2,3,5,7,11,13};
		int b[]={4,6,8,9,10,12};
		int count=0;
		
		for(int i=0;i<6;i++){
			for(int j=0;j<6;j++){
				if(a[i]*b[j]==k)	
					count++;
			}
		}
		
		System.out.println((double)count/36);
		
	}

}
0