結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-13 22:50:23
言語 Java21
(openjdk 21)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 390 bytes
コンパイル時間 2,273 ms
コンパイル使用メモリ 74,456 KB
実行使用メモリ 41,636 KB
最終ジャッジ日時 2024-04-15 19:43:54
合計ジャッジ時間 3,854 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
41,280 KB
testcase_01 AC 125 ms
41,568 KB
testcase_02 AC 119 ms
41,028 KB
testcase_03 AC 111 ms
40,192 KB
testcase_04 AC 123 ms
41,636 KB
testcase_05 AC 120 ms
41,428 KB
testcase_06 AC 120 ms
41,280 KB
testcase_07 AC 108 ms
40,180 KB
testcase_08 AC 113 ms
40,084 KB
testcase_09 AC 120 ms
41,264 KB
testcase_10 AC 122 ms
41,172 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int C = sc.nextInt();
        int Rin = sc.nextInt();
        int Rout= sc.nextInt();
        double r = (Rout-Rin)/2.0;
        double d = (Rout+Rin)/2.0;
        double total = C*r*r*Math.PI * 2*d*Math.PI;
        System.out.println(total);
    }
}
0