From: 2015-05-09 13:00:00
To: 2015-05-09 18:00:00
Now: 2017-09-22 06:45:05
C - A Math Homework
Time Limit: 1s
Memory Limit: 128MB
Submissions: 367 Solved: 153
QKL is a poor and busy guy, and he was not good at math.
Last day, his teacher assigned a homework: Give you 3 segments with positive length, can you use these segments to make a triangle? If can, what is the type of the triangle? Acute triangle, right triangle or obtuse triangle? Pay attention that vertices of triangle must be vertices of two segments.
QKL is afraid of any type of math problems, so he turns to you for help. Can you help him?
Several test cases, one line per case.
In case consists of three positive integers: a, b, c, indicating the lengths of 3 segments.
0 < a, b, c <= 10000
In each test case, you just print one line of result.
If you can't make a triangle by using these segments, print "FAIL TO MAKE!"(quote for clarify).
If you can make an acute triangle, print "Acute"(quote for clarify).
If you can make a right triangle, print "Right"(quote for clarify).
If you can make an obtuse triangle, print "Obtuse"(quote for clarify).
- Sample Input
1 2 3
2 3 4
3 4 5
4 5 6
- Sample Output
FAIL TO MAKE!
You can use this form of code to deal with several test cases.
while (scanf("%d%d%d", &a, &b, &c) != EOF)
//Your codes here.