結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-18 02:46:54
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 359 bytes
コンパイル時間 2,484 ms
コンパイル使用メモリ 70,816 KB
実行使用メモリ 56,184 KB
最終ジャッジ日時 2023-08-17 08:27:57
合計ジャッジ時間 3,974 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,880 KB
testcase_01 AC 120 ms
55,956 KB
testcase_02 AC 124 ms
56,168 KB
testcase_03 AC 122 ms
55,756 KB
testcase_04 AC 125 ms
55,984 KB
testcase_05 AC 123 ms
54,044 KB
testcase_06 AC 123 ms
55,652 KB
testcase_07 AC 121 ms
55,868 KB
testcase_08 AC 120 ms
55,868 KB
testcase_09 AC 122 ms
56,184 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int P = sc.nextInt();
        double a = (2+3+5+7+11+13)/6.0;
        int C = sc.nextInt();
        double b = (4+6+8+9+10+12)/6.0;
        double r = Math.pow(a,P) * Math.pow(b,C);
        System.out.println(r);
    }
}
0