問題一覧 > 通常問題

No.89 Let's Go Big with Donuts, One After Another!

レベル : / AI推定難易度 : 147 / 実行時間制限 : 1ケース 5.000秒 / メモリ制限 : 512 MB / 小数誤差許容問題 絶対誤差または相対誤差が $10^{-5}$ 以下。ただし、ジャッジ側の都合で500桁未満にしてください
タグ : (AC するまで非表示) / 解いたユーザー数 585
作問者 : is_eri23
お気に入りにしたユーザー ProblemId : 179 / 自分の提出
問題文最終更新日: 2026-06-25 20:30:33
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence. Back to the original
yukicoder contest 57 (順位表) の他の問題:

Problem Statement

The animation club of a certain high school was making a pledge over donuts in preparation for the school festival.
Since they are high school girls, they are concerned about calories. However, the donuts they bought had no calorie information listed.
Viewed from above, the donuts they bought look like a perfect pair of concentric circles, and cutting through the ring of the donut gives a perfect circle. (In other words, the donut is a torus.)
So they decided to find the calories using the fact that the donut has \(C\)kcal per \(1cm^{3}\).

Input

\(C\)
\(R_{in}\ R_{out}\)

\(C\) is the calories per \(1cm^3\) of the donut. (C is an integer, \(0 \leq C \leq 10\) )
\(R_{in}\) is the radius (cm) of the inner circle when the donut is viewed from directly above. (\(R_{in}\) is a positive integer, \(1 \leq R_{in} \leq 20\))
\(R_{out}\) is the radius (cm) of the outer circle when the donut is viewed from directly above. (\(R_{out}\) is a positive integer, \(R_{in} \leq R_{out} \leq 20\))

Output

Output the calories of the donut they bought.
An error of up to \(10^{-5}\) is allowed. Do not forget the newline at the end.

Sample

Sample 1
Input
0
5 10
Output
0.0000000000

A magical donut that won't make you gain weight no matter how much you eat.

Sample 2
Input
10
1 20
Output
187053.6774116461

The diet starts tomorrow.

Hint
You may use Pappus's centroid theorem (the Pappus-Guldinus theorem). (If you still don't understand, try searching for "トーラス 体積" (torus volume).)

提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。