結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー ぴろず
提出日時 2015-05-22 22:33:40
言語 Java
(openjdk 23)
結果
AC  
実行時間 134 ms / 5,000 ms
コード長 447 bytes
コンパイル時間 1,963 ms
コンパイル使用メモリ 73,824 KB
実行使用メモリ 54,416 KB
最終ジャッジ日時 2024-07-06 05:07:44
合計ジャッジ時間 3,948 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

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