結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー samplelpmas
提出日時 2017-01-19 15:48:29
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 5,000 ms
コード長 529 bytes
コンパイル時間 2,331 ms
コンパイル使用メモリ 73,932 KB
実行使用メモリ 41,636 KB
最終ジャッジ日時 2024-10-05 23:06:42
合計ジャッジ時間 4,327 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

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