Triangle Check
0.5s 256MGiven three line segments with lengths \(a\), \(b\), and \(c\), determine whether they can form a triangle. If they can, determine whether the triangle is equilateral, isosceles, right, or normal.
Input
The input consists of a single line containing three positive integers \(a\), \(b\), and \(c\), representing the lengths of the three line segments.
Constraints
- \(1 \le a \le b \le c \le 100\)
Output
Check the conditions in the following order and output one line:
- If \(a\), \(b\), and \(c\) cannot form a triangle, output
Not Triangle. - Otherwise, if they form an equilateral triangle, output
Equilateral Triangle. - Otherwise, if they form an isosceles triangle, output
Isosceles Triangle. - Otherwise, if they form a right triangle, output
Right Triangle. - Otherwise, output
Normal Triangle.
Sample Input 1
1 2 3
Sample Output 1
Not Triangle
Sample Input 2
2 3 4
Sample Output 2
Normal Triangle
Sample Input 3
3 4 5
Sample Output 3
Right Triangle
Sample Input 4
4 5 5
Sample Output 4
Isosceles Triangle
Sample Input 5
5 5 5
Sample Output 5
Equilateral Triangle
Log in to write and submit code. Creating an account is free.