結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー YamaKasa
提出日時 2018-05-16 20:02:34
言語 Java
(openjdk 23)
結果
AC  
実行時間 125 ms / 5,000 ms
コード長 357 bytes
コンパイル時間 1,887 ms
コンパイル使用メモリ 74,428 KB
実行使用メモリ 41,748 KB
最終ジャッジ日時 2024-10-05 23:27:58
合計ジャッジ時間 3,832 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		int C = scan.nextInt();
		int Rin = scan.nextInt();
		int Rout = scan.nextInt();
		scan.close();
		double r = Rout - Rin;
		double ans = C * r * r * (Rin + r / 2 ) * Math.PI / 4 * 2 * Math.PI;
		System.out.println(ans);

	}
}
0