結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー Pump0129Pump0129
提出日時 2018-03-28 00:16:10
言語 Java21
(openjdk 21)
結果
AC  
実行時間 137 ms / 5,000 ms
コード長 550 bytes
コンパイル時間 2,108 ms
コンパイル使用メモリ 74,776 KB
実行使用メモリ 54,356 KB
最終ジャッジ日時 2024-04-15 19:49:41
合計ジャッジ時間 4,293 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
54,272 KB
testcase_01 AC 136 ms
54,012 KB
testcase_02 AC 133 ms
54,092 KB
testcase_03 AC 134 ms
54,048 KB
testcase_04 AC 134 ms
54,292 KB
testcase_05 AC 137 ms
54,356 KB
testcase_06 AC 137 ms
54,256 KB
testcase_07 AC 135 ms
54,284 KB
testcase_08 AC 134 ms
54,344 KB
testcase_09 AC 135 ms
54,172 KB
testcase_10 AC 132 ms
54,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

package net.ipipip0129.yukicoder.no89;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner scan = new Scanner(System.in);

        int cal = Integer.parseInt(scan.nextLine());

        String[] data = scan.nextLine().split(" ");

        int rin = Integer.parseInt(data[0]);
        int rout = Integer.parseInt(data[1]);

        double doughnut = 0.25 * Math.pow(Math.PI, 2) * (rin + rout) * Math.pow((rout - rin), 2);

        System.out.println(doughnut * cal);
    }
}
0