#include<bits/stdc++.h>
long long a[1000000];
using namespace std;
int main()
{
int i;
while(1){
for(i=0; i<3; i++)
cin>>a[i];
sort(a,a+3);
if(a[0] == 0 && a[1] == 0 &&a[2] == 0)
break;
else{
if((a[0]*a[0]+a[1]*a[1])==(a[2]*a[2]))
cout<<"right\n";
else
cout<<"wrong\n";
}
}
return 0;
}
long long a[1000000];
using namespace std;
int main()
{
int i;
while(1){
for(i=0; i<3; i++)
cin>>a[i];
sort(a,a+3);
if(a[0] == 0 && a[1] == 0 &&a[2] == 0)
break;
else{
if((a[0]*a[0]+a[1]*a[1])==(a[2]*a[2]))
cout<<"right\n";
else
cout<<"wrong\n";
}
}
return 0;
}
No comments:
Post a Comment