Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/begin-konus

Cone

Medium 1000 ms 64 MB 35%
Share

The base radius $r$ and height $h$ of a cone are given. Find the slant height $l$, the volume $V$ and the total surface area $S$:

$$l = \sqrt{r^{2} + h^{2}}, \qquad V = \frac{\pi * r^{2} * h}{3}, \qquad S = \pi * r * (r + l)$$

Use $\pi = 3.141592653589793$.

A cone: base radius r, height h, slant height l

Input

One line with two positive integers: $r$ and $h$.

Output

One line with three numbers: $l$, $V$ and $S$, each with exactly 2 digits after the decimal point (for example, 5.00).

Note

$1 \le r, h \le 1000$

Examples

Input #1
3 4
Output #1
5.00 37.70 75.40
Input #2
1 1
Output #2
1.41 1.05 7.58

Sign in to submit a solution

Signing up is free and takes a minute.