結果

問題 No.212 素数サイコロと合成数サイコロ (2)
ユーザー kenji_shioyakenji_shioya
提出日時 2016-06-22 04:40:55
言語 Java21
(openjdk 21)
結果
AC  
実行時間 140 ms / 5,000 ms
コード長 434 bytes
コンパイル時間 2,904 ms
コンパイル使用メモリ 74,592 KB
実行使用メモリ 41,400 KB
最終ジャッジ日時 2024-04-20 00:15:35
合計ジャッジ時間 4,915 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 114 ms
41,100 KB
testcase_01 AC 115 ms
40,700 KB
testcase_02 AC 120 ms
41,048 KB
testcase_03 AC 108 ms
40,760 KB
testcase_04 AC 128 ms
41,052 KB
testcase_05 AC 114 ms
41,292 KB
testcase_06 AC 125 ms
41,268 KB
testcase_07 AC 124 ms
41,336 KB
testcase_08 AC 136 ms
41,328 KB
testcase_09 AC 140 ms
41,400 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