結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー Daigo HIROOKADaigo HIROOKA
提出日時 2018-07-04 02:07:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 122 ms / 5,000 ms
コード長 325 bytes
コンパイル時間 2,949 ms
コンパイル使用メモリ 71,788 KB
実行使用メモリ 56,624 KB
最終ジャッジ日時 2023-09-13 17:25:07
合計ジャッジ時間 5,085 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
56,312 KB
testcase_01 AC 119 ms
55,964 KB
testcase_02 AC 119 ms
55,520 KB
testcase_03 AC 121 ms
55,748 KB
testcase_04 AC 120 ms
55,916 KB
testcase_05 AC 120 ms
55,752 KB
testcase_06 AC 118 ms
56,024 KB
testcase_07 AC 122 ms
56,624 KB
testcase_08 AC 120 ms
56,132 KB
testcase_09 AC 119 ms
55,852 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class No212{
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);

		int p = sc.nextInt();
		int c = sc.nextInt();
		double e_p = (2+3+5+7+11+13)/6.0;
		double e_c = (4+6+8+9+10+12)/6.0;

		double ans = Math.pow(e_p, p)*Math.pow(e_c, c);
		System.out.println(ans);
	}
}
0