Identify the Triangle
Statement
Goal
Given integer side lengths, determine if a triangle isInput
Line 1: Three space separated integers a b and c for the lengths of each side, monotonically increasing.
Output
Line 1: A string indicating one of five distinct outcomes.
If the triangle has an area, classify it as:
acute if each angle is < 90°
right if one angle is 90°
obtuse if one angle is > 90°
Exceptional cases:
degenerate if the triangle is flat with no area
impossible if the triangle cannot be constructed
If the triangle has an area, classify it as:
Exceptional cases:
Constraints
0 < a <= b <= c < 100
Example
Input
3 4 5
Output
right
Game modes
Fastest, Shortest, Reverse
Test cases
Right Test
Input
3 4 5
Output
right
Validator 1 Validator
Input
12 35 37
Output
right
Obtuse Test
Input
5 12 15
Output
obtuse
Validator 2 Validator
Input
20 21 30
Output
obtuse
Acute Test
Input
6 8 9
Output
acute
Validator 3 Validator
Input
12 15 18
Output
acute
Degenerate Test
Input
1 2 3
Output
degenerate
Validator 4 Validator
Input
5 8 13
Output
degenerate
Impossible Test
Input
7 11 24
Output
impossible
Validator 5 Validator
Input
5 6 13
Output
impossible
Solution language
Solution
Stub generator input