P5717 [Deep Basic 3. Exercise 8] Triangle Classification
Description
Given the lengths of three line segments $a$, $b$, and $c$, all positive integers not greater than $10000$. We want to form a triangle using these three segments. What kind of triangle can it be?
- If the three segments cannot form a triangle, output `Not triangle`.
- If it is a right triangle, output `Right triangle`.
- If it is an acute triangle, output `Acute triangle`.
- If it is an obtuse triangle, output `Obtuse triangle`.
- If it is an isosceles triangle, output `Isosceles triangle`.
- If it is an equilateral triangle, output `Equilateral triangle`.
If the triangle satisfies multiple conditions above, output them in the order given above, each on a separate line.
Input Format
Input 3 integers $a$, $b$, and $c$.
Output Format
Output several lines of decision strings.
Explanation/Hint
When the sum of the squares of the two shorter sides is greater than the square of the longest side, it is an acute triangle.
When the sum of the squares of the two shorter sides is equal to the square of the longest side, it is a right triangle.
When the sum of the squares of the two shorter sides is less than the square of the longest side, it is an obtuse triangle.
Translated by ChatGPT 5