No.3151 natural math of inscribed circle
Problem Statement
Find the radius of the circle inscribed in a triangle whose side lengths are $A$ , $B$ , $C$ . It is guaranteed that the given triangle satisfies the triangle inequality.
Constraints
- $1 \leq A \leq B \leq C \leq 10^6$
- $C < (A + B)$
- All inputs are integers.
Input
$A$ $B$ $C$
Output
Your answer is judged as correct if its absolute or relative error from the true value is at most $10^{-6}$ .
Sample
Sample 1
Input
3 4 5
Output
1.000000000000000
The radius of the circle inscribed in the triangle whose side lengths are $3$ $,$ $4$ $,$ $5$ is $1$ .
Since an answer is judged as correct if its absolute or relative error from the true value is at most $10^{-6}$ , answers such as $1.00000001$ and $0.99999999987654321$ are also correct.
Sample 2
Input
10 10 10
Output
2.886751345948129
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
Cafe1942
kazuppa