結果

問題 No.89 どんどんドーナツどーんといこう!
コンテスト
ユーザー fkwnw3_1243
提出日時 2017-04-27 21:27:35
言語 Java
(openjdk 25.0.2)
コンパイル:
javac -encoding UTF8 _filename_
実行:
java -ea -Xmx700m -Xss256M -DONLINE_JUDGE=true _class_
結果
AC  
実行時間 32 ms / 5,000 ms
コード長 628 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 3,025 ms
コンパイル使用メモリ 81,360 KB
実行使用メモリ 39,144 KB
最終ジャッジ日時 2026-04-21 07:50:53
合計ジャッジ時間 4,689 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge2_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;


public class Main {

    public static void main(String[] args) throws IOException {
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        int C = Integer.parseInt(reader.readLine());
        String[] inputs = reader.readLine().split(" ");
        int Rin = Integer.parseInt(inputs[0]);
        int Rout = Integer.parseInt(inputs[1]);
        double r = (Rout - Rin )/2.0;
        double V = ((Rin +Rout) / 2.0) * 2 * Math.PI *  (r * r * Math.PI) * C;
        System.out.println(V);

    }
}
0