結果

問題 No.211 素数サイコロと合成数サイコロ (1)
ユーザー 37zigen37zigen
提出日時 2016-03-30 14:32:47
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 1,000 ms
コード長 378 bytes
コンパイル時間 2,900 ms
コンパイル使用メモリ 71,208 KB
実行使用メモリ 55,956 KB
最終ジャッジ日時 2023-09-08 05:40:08
合計ジャッジ時間 7,856 ms
ジャッジサーバーID
(参考情報)
judge14 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 127 ms
55,504 KB
testcase_01 AC 128 ms
55,476 KB
testcase_02 AC 128 ms
55,672 KB
testcase_03 AC 127 ms
55,804 KB
testcase_04 AC 128 ms
55,680 KB
testcase_05 AC 126 ms
55,616 KB
testcase_06 AC 126 ms
55,812 KB
testcase_07 AC 126 ms
55,716 KB
testcase_08 AC 124 ms
55,920 KB
testcase_09 AC 127 ms
55,924 KB
testcase_10 AC 125 ms
55,616 KB
testcase_11 AC 128 ms
55,672 KB
testcase_12 AC 126 ms
55,500 KB
testcase_13 AC 126 ms
55,716 KB
testcase_14 AC 129 ms
55,484 KB
testcase_15 AC 130 ms
55,652 KB
testcase_16 AC 132 ms
55,616 KB
testcase_17 AC 127 ms
55,332 KB
testcase_18 AC 126 ms
55,560 KB
testcase_19 AC 127 ms
55,552 KB
testcase_20 AC 125 ms
55,460 KB
testcase_21 AC 132 ms
55,772 KB
testcase_22 AC 126 ms
55,484 KB
testcase_23 AC 127 ms
55,576 KB
testcase_24 AC 125 ms
55,500 KB
testcase_25 AC 130 ms
55,588 KB
testcase_26 AC 127 ms
55,956 KB
testcase_27 AC 126 ms
55,668 KB
testcase_28 AC 129 ms
55,616 KB
testcase_29 AC 128 ms
55,948 KB
testcase_30 AC 124 ms
55,488 KB
testcase_31 AC 125 ms
55,336 KB
testcase_32 AC 126 ms
55,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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