#CCBCMCHIN0000053. Phân loại tam giác theo góc và cạnh (Triangle Types)
Phân loại tam giác theo góc và cạnh (Triangle Types)
Triangle Types
Source: beecrowd
Version: Phuoc Hung OJ Extended
Problem Statement
Given positive real side lengths . In descending order , if no triangle exists. Otherwise classify its angles by comparing with and additionally report whether it is equilateral or isosceles when applicable. A valid triangle may produce two lines.
Input
One line contains three positive real values , each with at most one decimal digit.
Output
If no triangle exists, print NAO FORMA TRIANGULO only. Otherwise print one of TRIANGULO RETANGULO, TRIANGULO OBTUSANGULO, TRIANGULO ACUTANGULO, optionally followed by TRIANGULO EQUILATERO or TRIANGULO ISOSCELES on the next line.
Subtasks
-
Subtask 1 (20 points): 0 < A,B,C <= 10, at most one decimal digit.
-
Subtask 2 (30 points): 0 < A,B,C <= 100, at most one decimal digit.
-
Subtask 3 (50 points): 0 < A,B,C <= 1000, at most one decimal digit.
Examples
Example 1
Input
3.0 4.0 5.0
Output
TRIANGULO RETANGULO
Explanation
For this input, the case-specific computation and the required exact output are shown above. The sides form a right triangle but not an isosceles triangle.
Example 2
Input
7.0 7.0 7.0
Output
TRIANGULO ACUTANGULO
TRIANGULO EQUILATERO
Explanation
For this input, the case-specific computation and the required exact output are shown above. An equilateral triangle is also acute.