Type of a triangle
![notion image](https://www.notion.so/image/https%3A%2F%2Fs3-us-west-2.amazonaws.com%2Fsecure.notion-static.com%2F812bdedb-0adf-43dd-a426-11d2a3ee3300%2Ftypes-triangles-vector-illustration-collection-example-equilateral-equal-sided-isosceles-same-angle-figures-study-cheat-175189335.jpg?table=block&id=6c3a3b56-3bf4-4f4b-80ef-8e2fae386323&cache=v2)
There are 3 types of triangles:
- Equilateral: All 3 sides are equal
- Isosceles: Only 2 sides are equal
- Scalene: None of the sides are equal
Given 3 sides of a triangle, your task is to determine the type of the triangle.
In case it’s impossible to construct a triangle, the program should print
Invalid triangle
.Input | Output |
2
3
6 | Invalid triangle |
3
3
3 | Equilateral |
2
8
8 | Isosceles |
10
8
9 | Scalene |
Note that a triangle is considered invalid if the sum of any two sides is less than or equal to the third side.
Constraints
Time limit: 2 seconds
Memory limit: 512 MB
Output limit: 1 MB