Type of a triangle

notion image
There are 3 types of triangles:
  1. Equilateral: All 3 sides are equal
  1. Isosceles: Only 2 sides are equal
  1. 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.
2 3 6
Invalid triangle
3 3 3
2 8 8
10 8 9
Note that a triangle is considered invalid if the sum of any two sides is less than or equal to the third side.


Time limit: 2 seconds

Memory limit: 512 MB

Output limit: 1 MB

To check your solution you need to sign in
Sign in to continue