結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー yagi2yagi2
提出日時 2017-04-25 12:48:46
言語 Java19
(openjdk 21)
結果
AC  
実行時間 120 ms / 5,000 ms
コード長 445 bytes
コンパイル時間 2,057 ms
コンパイル使用メモリ 71,816 KB
実行使用メモリ 55,960 KB
最終ジャッジ日時 2023-07-28 10:56:33
合計ジャッジ時間 4,174 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,404 KB
testcase_01 AC 117 ms
55,560 KB
testcase_02 AC 120 ms
55,380 KB
testcase_03 AC 119 ms
55,664 KB
testcase_04 AC 116 ms
55,684 KB
testcase_05 AC 116 ms
55,596 KB
testcase_06 AC 116 ms
55,616 KB
testcase_07 AC 118 ms
55,636 KB
testcase_08 AC 117 ms
55,556 KB
testcase_09 AC 117 ms
55,704 KB
testcase_10 AC 117 ms
55,960 KB
権限があれば一括ダウンロードができます

ソースコード

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