結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー itezpaceitezpace
提出日時 2016-08-22 17:24:51
言語 Java21
(openjdk 21)
結果
AC  
実行時間 151 ms / 5,000 ms
コード長 439 bytes
コンパイル時間 2,131 ms
コンパイル使用メモリ 74,188 KB
実行使用メモリ 41,872 KB
最終ジャッジ日時 2024-04-15 19:43:02
合計ジャッジ時間 4,590 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 136 ms
40,876 KB
testcase_01 AC 147 ms
41,832 KB
testcase_02 AC 145 ms
41,280 KB
testcase_03 AC 145 ms
41,680 KB
testcase_04 AC 134 ms
41,028 KB
testcase_05 AC 147 ms
41,560 KB
testcase_06 AC 148 ms
41,632 KB
testcase_07 AC 150 ms
41,660 KB
testcase_08 AC 149 ms
41,716 KB
testcase_09 AC 148 ms
41,872 KB
testcase_10 AC 151 ms
41,556 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
import java.lang.Math;

class Yuki89 {
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    double c = sc.nextDouble();
    double ri = sc.nextDouble();
    double ro = sc.nextDouble();
    double r = (double)((ro-ri)/2);
    double g = r+ri;
    double x = 0;
    double pi = Math.PI;
    double gd = 2*pi*g;
    double s = r*r*pi;
    x=c*gd*s;
    System.out.println(x);
  }
}
0