結果
問題 |
No.89 どんどんドーナツどーんといこう!
|
ユーザー |
![]() |
提出日時 | 2017-04-27 21:27:35 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 45 ms / 5,000 ms |
コード長 | 628 bytes |
コンパイル時間 | 3,505 ms |
コンパイル使用メモリ | 72,776 KB |
実行使用メモリ | 37,076 KB |
最終ジャッジ日時 | 2024-10-05 23:13:51 |
合計ジャッジ時間 | 4,650 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) throws IOException { BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); int C = Integer.parseInt(reader.readLine()); String[] inputs = reader.readLine().split(" "); int Rin = Integer.parseInt(inputs[0]); int Rout = Integer.parseInt(inputs[1]); double r = (Rout - Rin )/2.0; double V = ((Rin +Rout) / 2.0) * 2 * Math.PI * (r * r * Math.PI) * C; System.out.println(V); } }