結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー samplelpmassamplelpmas
提出日時 2017-01-19 15:48:29
言語 Java19
(openjdk 21)
結果
AC  
実行時間 129 ms / 5,000 ms
コード長 529 bytes
コンパイル時間 2,300 ms
コンパイル使用メモリ 71,556 KB
実行使用メモリ 56,008 KB
最終ジャッジ日時 2023-07-28 10:55:14
合計ジャッジ時間 4,710 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,460 KB
testcase_01 AC 124 ms
55,932 KB
testcase_02 AC 126 ms
55,768 KB
testcase_03 AC 124 ms
55,648 KB
testcase_04 AC 124 ms
55,768 KB
testcase_05 AC 123 ms
55,788 KB
testcase_06 AC 125 ms
55,720 KB
testcase_07 AC 124 ms
56,008 KB
testcase_08 AC 129 ms
55,712 KB
testcase_09 AC 125 ms
55,520 KB
testcase_10 AC 127 ms
55,640 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int perCalorie = sc.nextInt();

        double rIn = sc.nextInt();
        double rOut = sc.nextInt();

        double radius = (rOut - rIn) / 2;

        double surfaceArea = radius * radius * Math.PI;

        double centerGravity = (rOut + rIn) / 2;

        double volume = 2 * Math.PI * centerGravity * surfaceArea;

        System.out.println(volume * perCalorie);

    }

}
0