結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー yagi2yagi2
提出日時 2017-04-25 12:48:46
言語 Java21
(openjdk 21)
結果
AC  
実行時間 116 ms / 5,000 ms
コード長 445 bytes
コンパイル時間 1,934 ms
コンパイル使用メモリ 75,004 KB
実行使用メモリ 41,392 KB
最終ジャッジ日時 2024-04-15 19:45:46
合計ジャッジ時間 3,711 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 109 ms
40,920 KB
testcase_01 AC 100 ms
40,028 KB
testcase_02 AC 114 ms
40,876 KB
testcase_03 AC 103 ms
39,840 KB
testcase_04 AC 114 ms
41,392 KB
testcase_05 AC 106 ms
40,444 KB
testcase_06 AC 116 ms
41,240 KB
testcase_07 AC 114 ms
40,844 KB
testcase_08 AC 105 ms
39,840 KB
testcase_09 AC 101 ms
40,144 KB
testcase_10 AC 113 ms
40,844 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