結果
問題 | No.89 どんどんドーナツどーんといこう! |
ユーザー |
|
提出日時 | 2018-03-28 00:16:05 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 128 ms / 5,000 ms |
コード長 | 550 bytes |
コンパイル時間 | 2,388 ms |
コンパイル使用メモリ | 75,104 KB |
実行使用メモリ | 54,244 KB |
最終ジャッジ日時 | 2024-10-05 23:25:31 |
合計ジャッジ時間 | 4,157 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 9 |
ソースコード
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);}}