結果

問題 No.89 どんどんドーナツどーんといこう!
ユーザー shinshin
提出日時 2022-06-05 16:54:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 59 ms / 5,000 ms
コード長 862 bytes
コンパイル時間 5,552 ms
コンパイル使用メモリ 75,756 KB
実行使用メモリ 53,784 KB
最終ジャッジ日時 2023-10-21 03:13:43
合計ジャッジ時間 6,177 ms
ジャッジサーバーID
(参考情報)
judge9 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 59 ms
53,784 KB
testcase_01 AC 58 ms
52,864 KB
testcase_02 AC 58 ms
52,816 KB
testcase_03 AC 58 ms
51,896 KB
testcase_04 AC 58 ms
53,780 KB
testcase_05 AC 57 ms
51,912 KB
testcase_06 AC 58 ms
52,840 KB
testcase_07 AC 58 ms
52,636 KB
testcase_08 AC 59 ms
53,752 KB
testcase_09 AC 58 ms
53,748 KB
testcase_10 AC 57 ms
52,644 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.ArrayList;

public class No89 {

	public static void main(String[] args) throws IOException{
		//どんどんドーナツ
		String[] str = readStr();
		
		double C = Double.parseDouble(str[0]),Rin = Double.parseDouble(str[1].split(" ")[0]) , Rout = Double.parseDouble(str[1].split(" ")[1]);
		
		double r = (Rout - Rin) / 2 , l = r * r * Math.PI * (Rin + r) * 2 * Math.PI;
		
		System.out.println(l * C);
		

	}
	
	public static String[] readStr() throws IOException{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		ArrayList<String> list = new ArrayList<>();

		do {
			list.add(br.readLine());
		}while(br.ready());

		br.close();

		String[] text = new String[list.size()];
		list.toArray(text);

		return text;

	}

}
0