SCPC11D  Egypt
A long time ago, the Egyptians figured out that a triangle with sides of length 3, 4, and 5 had a right angle as its largest angle. You must determine if other triangles have a similar property.
Input
Input represents several test cases, followed by a line containing 0 0 0. Each test case has three positive integers, less than 30,000, denoting the lengths of the sides of a triangle.
Output
For each test case, a line containing "right" if the triangle is a right triangle, and a line containing "wrong" if the triangle is not a right triangle.
Example
Input:6 8 1025 52 606 8 10 25 52 60 5 12 13 0 0 05 12 130 0 0Output: right wrong right
hide comments
Wumbolo:
20160709 00:30:05
you don't need to take care of cases when a triangle isn't possible. only pythagorean theorem needed.


ehabshhadat:
20151008 20:16:34
nice


ALi Ibrahim:
20150726 11:10:47
nice Problem Ali, Keep up the good work my friend :) 

karthik1997:
20150714 20:03:25
very easy one if we take care about the side possibilities of a triangle and if we know pythagoreas thorem :p 0.00s ac in 1st go 

shunmugavel:
20150701 11:14:36
easy problem 

Dushyant Singh:
20150118 08:02:37
Given test cases will give output as right


:.Mohib.::
20141222 06:52:24
Easy One.... :) 

pvkcse:
20140524 12:49:07
remembered pythagoras theorem... 

SHIVAM DIXIT:
20140417 20:27:14
accepted in first attempt :):) take care of case when triangle isnt possible Last edit: 20140417 20:27:26 

Samil Vargas:
20131219 00:16:07
please any one some testcases please i want to know whats wrong with my code.

Added by:  Ali Arous 
Date:  20111018 
Time limit:  1s 
Source limit:  50000B 
Memory limit:  1536MB 
Cluster:  Cube (Intel G860) 
Languages:  All except: ASM64 
Resource:  Syrian Collegiate Programming Contest 2011 