#K72512. Total Area of Flower Beds
Total Area of Flower Beds
Total Area of Flower Beds
You are given five integers: r, l, w, a, and h. These represent the dimensions of three distinct flower beds:
- A circular flower bed with radius \(r\). Its area is given by \(\pi \times r^2\).
- A rectangular flower bed with length \(l\) and width \(w\). Its area is \(l \times w\).
- A triangular flower bed with base \(a\) and height \(h\). Its area is \(\frac{1}{2} \times a \times h\).
Your task is to calculate and output the total area of all three flower beds. The formula to compute the total area is:
\[ A = \pi \times r^2 + l \times w + \frac{1}{2} \times a \times h \]
The answer must be output as a floating-point number.
inputFormat
The input is provided via stdin and consists of a single line containing five space-separated integers:
r
- radius of the circular flower bedl
- length of the rectangular flower bedw
- width of the rectangular flower beda
- base of the triangular flower bedh
- height of the triangular flower bed
outputFormat
Output the total area computed from the provided dimensions. The result should be printed to stdout as a floating-point number. No extra characters or spaces should be included in the output.
## sample3 4 6 5 2
51.56637061435917