#B3794. Model Material Calculation
Model Material Calculation
Model Material Calculation
Little A is building a model and wants to know how many square meters of material are required. The model consists of a rectangle surmounted by a semicircle and followed by another semicircle at the bottom. The parameters a, b, and c (all given in centimeters) are provided as input. Specifically, the rectangle has a width of a and a height of b, while the top and bottom parts are semicircles with diameters a and c respectively.
The area of the rectangle is computed as:
\(A_{rect} = a \times b\)
The area of a semicircle with diameter d is given by:
\(A_{semi} = \frac{\pi \times d^2}{8}\)
Thus, the total area in square centimeters is:
\(A_{total} = a \times b + \frac{\pi \times (a^2 + c^2)}{8}\)
Since the input dimensions are in centimeters, you must convert the result to square meters (1 m² = 10,000 cm²) before outputting the answer.
Use \(\pi = 3.1415926535\).
inputFormat
The input consists of three positive numbers a, b, and c (in centimeters) separated by spaces.
outputFormat
Output the area of material needed (in square meters). The answer should be printed as a floating-point number.
sample
10 20 30
0.0592699082