Type of triangle

Submit

Your name:
File:
Open code-statistics:

Language is selected by the extension of the file. See the list of supported languages to know the extension of your language.

Problem

(From SPOJ)

Given the lengths of the sides of a triangle, determine its type.

For each set of numbers, print:

right - if the triangle is right
obtuse - if the triangle is obtuse
acute - if the triangle is acute
none - if there is no such triangle

Options

exec is denied

no deadline, the server will not save your submission

Sample input:_

7 7 7
3 4 5
10 1 1
4 4 5
0 3 2
30 30 30
12 13 5
0 0 0
9 6 9
21 5 17

Sample output:

acute
right
none
acute
none
acute
right
none
acute
obtuse

Sample input:_

1 5 2
54 55 100
8 7 7
6 10 8
9 0 10
40 38 8
12 13 15
5 9 12
123 78 89
8 8 3

Sample output:

none
obtuse
acute
right
none
obtuse
acute
obtuse
obtuse
acute

Sample input:_

58 11 50
3 10 7
13 8 8
6 4 6
1 2 3
4 4 4
120 0 0
20 21 29
9 41 40
8 6 3

Sample output:

obtuse
none
obtuse
acute
none
acute
none
right
right
obtuse

Ranking

Ruby _

RankUserSizeTimeDateStatistics
1leonid810.03232013/05/11 03:09:150B / 51B / 25B
2Histocrat930.03582013/05/11 04:55:250B / 54B / 31B
3Jan Dvorak990.03442013/05/11 13:55:531B / 57B / 35B

Perl _

RankUserSizeTimeDateStatistics
1Hem970.05262016/06/27 16:20:270B / 46B / 49B

Python _

RankUserSizeTimeDateStatistics
1xsot (luck)860.12582015/12/05 18:17:080B / 58B / 26B
2leonid900.11842013/05/11 02:54:510B / 58B / 30B
3rolf900.08672013/05/11 22:12:030B / 59B / 30B
4hallvabo (embed)900.10412013/06/03 09:39:070B / 58B / 30B
5xsot1130.12022013/05/10 22:17:270B / 75B / 37B
6hallvabo1130.09002013/06/03 08:28:040B / 75B / 37B

Python3 _

RankUserSizeTimeDateStatistics
1xsot (luck)890.16712015/12/05 18:33:080B / 56B / 31B

PHP _

RankUserSizeTimeDateStatistics
1primo1260.06822013/07/03 21:07:332B / 66B / 58B

JavaScript _

RankUserSizeTimeDateStatistics
1copy940.04942013/05/15 02:03:240B / 60B / 33B
2Shmiddty940.06082013/05/15 02:24:230B / 60B / 33B
3FizzyTea1030.04942016/09/14 01:11:210B / 71B / 29B
4FizzyTea (guess)1060.03792013/05/14 23:20:230B / 74B / 29B
5Shmiddty (non-cheat)1240.04302013/05/14 07:07:010B / 73B / 50B
6Jan Dvorak1330.04452013/05/14 06:52:530B / 75B / 57B

Lua _

RankUserSizeTimeDateStatistics
1AndoDaan1380.03212014/08/11 04:06:200B / 88B / 47B

J _

RankUserSizeTimeDateStatistics
1I., S.780.07552013/05/11 18:06:220B / 35B / 43B

C _

RankUserSizeTimeDateStatistics
1llhuii(luck)870.00052014/10/05 12:16:089B / 47B / 31B
2tails880.00082013/05/12 23:03:068B / 46B / 34B
3llhuii1330.03192014/10/05 10:52:370B / ?B / ?B
4pandamonium1340.03282013/05/11 12:12:240B / 68B / 66B
5TokusiN1440.02652013/05/29 11:25:360B / ?B / ?B
6konomin1940.03252015/11/27 05:01:240B / ?B / ?B

C# _

RankUserSizeTimeDateStatistics
1asaq2840.18572013/06/15 09:59:280B / 184B / 84B

AWK _

RankUserSizeTimeDateStatistics
1llhuii960.03182014/10/05 10:50:320B / ?B / ?B

sed _

RankUserSizeTimeDateStatistics
1%20860.03182015/12/05 20:10:280B / 46B / 29B

Bash _

RankUserSizeTimeDateStatistics
1llhuii1020.01802014/10/05 10:51:050B / ?B / ?B
2mute1920.04692013/07/11 03:21:270B / 81B / 97B

Zsh _

RankUserSizeTimeDateStatistics
1llhuii1020.02722014/10/05 10:51:290B / ?B / ?B

Fish _

RankUserSizeTimeDateStatistics
1llhuii1020.04262014/10/05 10:51:460B / ?B / ?B

xgawk _

RankUserSizeTimeDateStatistics
1llhuii960.03302014/10/05 10:50:160B / ?B / ?B

Postscript _

RankUserSizeTimeDateStatistics
1rolf2610.29122013/05/12 02:04:4461B / 121B / 47B

GolfScript _

RankUserSizeTimeDateStatistics
1tails600.05502013/05/13 01:12:126B / 35B / 16B

Language Ranking_

RankLangUserSizeScore
1GolfScripttails6010000
2JI., S.787692
3Rubyleonid817407
4Pythonxsot (luck)866976
5sed%20866976
6Cllhuii(luck)876896
7Python3xsot (luck)896741
8JavaScriptcopy946382
9xgawkllhuii966250
10AWKllhuii966250
11PerlHem976185
12Bashllhuii1025882
13Zshllhuii1025882
14Fishllhuii1025882
15PHPprimo1264761
16LuaAndoDaan1384347
17Postscriptrolf2612298
18C#asaq2842112

return top