結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー kou6839
提出日時 2014-12-09 13:01:18
言語 Java
(openjdk 23)
結果
AC  
実行時間 128 ms / 5,000 ms
コード長 375 bytes
コンパイル時間 1,820 ms
コンパイル使用メモリ 74,252 KB
実行使用メモリ 41,396 KB
最終ジャッジ日時 2024-10-05 22:24:14
合計ジャッジ時間 3,753 ms
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 9
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.math.*;
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 men = (rout*1.0-rin)/2*(rout*1.0-rin)/2*Math.PI;
		double kyori = (rout*1.0+rin)/2*2*Math.PI;
		System.out.println(men*kyori*c);
	}
}	
0