P5708 [Shenji 2. Exercise 2] Triangle Area
Description
The lengths of the three sides of a triangle are $a$, $b$, and $c$. Its area is $\sqrt{p(p-a)(p-b)(p-c)}$, where $p=\frac{1}{2}(a+b+c)$. Given these three numbers, compute the area of the triangle and round it to $1$ decimal place.
Input Format
The first line contains three real numbers $a$, $b$, and $c$, separated by spaces.
Output Format
Output one real number representing the area of the triangle, accurate to $1$ digit after the decimal point.
Explanation/Hint
Constraints: The testdata guarantees that a triangle can be formed. $0\leq a,b,c\leq 1000$. Each side length has at most $2$ digits after the decimal point in the input.
Translated by ChatGPT 5