結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー ぴろずぴろず
提出日時 2015-05-22 22:33:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 447 bytes
コンパイル時間 1,958 ms
コンパイル使用メモリ 72,148 KB
実行使用メモリ 55,944 KB
最終ジャッジ日時 2023-09-20 09:30:58
合計ジャッジ時間 3,928 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
53,572 KB
testcase_01 AC 125 ms
55,680 KB
testcase_02 AC 124 ms
55,428 KB
testcase_03 AC 119 ms
55,944 KB
testcase_04 AC 123 ms
55,576 KB
testcase_05 AC 125 ms
53,816 KB
testcase_06 AC 125 ms
55,756 KB
testcase_07 AC 128 ms
55,888 KB
testcase_08 AC 122 ms
55,868 KB
testcase_09 AC 122 ms
55,896 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package no212;

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) {
		double e1 = 0,e2 = 0;
		for(int i=0;i<6;i++) {
			e1 += d1[i];
			e2 += d2[i];
		}
		e1 /= 6;
		e2 /= 6;
		Scanner sc = new Scanner(System.in);
		int p = sc.nextInt();
		int c = sc.nextInt();
		System.out.println(Math.pow(e1,p) * Math.pow(e2, c));
	}

}
0