~/algor $ cat problems/teng-yonli-uchburchak-elementlari
Parts of an isosceles right triangle
One of the elements of an isosceles right triangle is given: $1$ — leg $a$, $2$ — hypotenuse $c$, $3$ — the height $h$ dropped to the hypotenuse, $4$ — area $S$. They are related by:
$$c = a * \sqrt{2}, \qquad h = \frac{c}{2}, \qquad S = \frac{a^{2}}{2}$$
The element number $N$ and its value $X$ are given. Find the other three elements.
Input
One line with an element number $N$ and its value $X$.
Output
One line with the other three elements in order of their numbers ($a$, $c$, $h$, $S$ without the given one), each with exactly 2 digits after the decimal point (for example, 1.41 0.71 0.50).
Note
$1 \le N \le 4$
$0 \lt X \le 100$, $X$ is an integer
Examples
1 1
1.41 0.71 0.50
1 2
2.83 1.41 2.00