Skip to content

Instantly share code, notes, and snippets.

@OmarJH
Last active August 29, 2015 14:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save OmarJH/30a547546ef1b338a2f2 to your computer and use it in GitHub Desktop.
Save OmarJH/30a547546ef1b338a2f2 to your computer and use it in GitHub Desktop.
ACM - SCPC11D - Egypt - SPOJ
#include <iostream>
#include <string>
using namespace std;
int main()
{
int t;
long long x, y,z;
cin >> x >> y >> z;
while (x!=0||y!=0||z!=0)
{
if (x*x + y*y == z*z || x*x + z*z == y*y || y*y + z*z == x*x)
cout << "right" << endl;
else
cout << "wrong" << endl;
cin >> x >> y >> z;
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment