結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー yagi2
提出日時 2017-04-25 12:48:46
言語 Java
(openjdk 23)
結果
AC  
実行時間 123 ms / 5,000 ms
コード長 445 bytes
コンパイル時間 1,993 ms
コンパイル使用メモリ 74,740 KB
実行使用メモリ 41,316 KB
最終ジャッジ日時 2024-10-05 23:13:33
合計ジャッジ時間 4,047 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 C = Integer.parseInt(sc.next());
        int Rin = Integer.parseInt(sc.next());
        int Rout = Integer.parseInt(sc.next());

        double R = (Rout - Rin) / 2.0;
        double D = (Rin + Rout) / 2.0;

        System.out.println(Math.pow(R, 2) * Math.pow(Math.PI, 2) * 2 * D * C);
    }
}
0