結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー l1267976l1267976
提出日時 2017-03-19 14:28:57
言語 Java19
(openjdk 21)
結果
AC  
実行時間 147 ms / 5,000 ms
コード長 450 bytes
コンパイル時間 4,432 ms
コンパイル使用メモリ 72,068 KB
実行使用メモリ 56,060 KB
最終ジャッジ日時 2023-07-28 10:56:15
合計ジャッジ時間 5,908 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 143 ms
55,856 KB
testcase_01 AC 141 ms
55,732 KB
testcase_02 AC 143 ms
55,932 KB
testcase_03 AC 142 ms
55,668 KB
testcase_04 AC 144 ms
55,696 KB
testcase_05 AC 144 ms
55,944 KB
testcase_06 AC 141 ms
56,060 KB
testcase_07 AC 142 ms
55,864 KB
testcase_08 AC 141 ms
55,900 KB
testcase_09 AC 142 ms
55,868 KB
testcase_10 AC 147 ms
55,892 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No89 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        double c = sc.nextDouble();
        double rIn = sc.nextDouble();
        double rOut = sc.nextDouble();

        double volume = (1d / 4d) * Math.pow(Math.PI, 2) * (rIn + rOut) * Math.pow((rOut - rIn), 2);
        double cal = c * volume;

        System.out.println(cal);

        sc.close();
    }

}
0