結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-22 04:40:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 5,000 ms
コード長 434 bytes
コンパイル時間 3,504 ms
コンパイル使用メモリ 76,000 KB
実行使用メモリ 56,480 KB
最終ジャッジ日時 2023-08-01 23:36:09
合計ジャッジ時間 5,888 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,652 KB
testcase_01 AC 124 ms
55,872 KB
testcase_02 AC 128 ms
56,240 KB
testcase_03 AC 131 ms
55,824 KB
testcase_04 AC 129 ms
56,480 KB
testcase_05 AC 127 ms
56,152 KB
testcase_06 AC 129 ms
56,196 KB
testcase_07 AC 130 ms
56,036 KB
testcase_08 AC 128 ms
55,928 KB
testcase_09 AC 127 ms
56,208 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;
import java.text.DecimalFormat;

public class Exercise109{
  public static void main (String[] args){

    Scanner sc = new Scanner(System.in);

    DecimalFormat df = new DecimalFormat("#.##########");

    double p = sc.nextDouble();
    double c = sc.nextDouble();

    double sumP = Math.pow(41, p);
    double sumC = Math.pow(49, c);

    System.out.println(df.format(sumP * sumC / Math.pow(6, p + c)));
  }
}
0