Higher Math

http://acm.hdu.edu.cn/showproblem.php?pid=2393

 1 #include <iostream>
 2 using namespace std;
 3 int main()
 4 {
 5     int n,a,b,c;
 6     cin >> n;
 7     for (int i=1;i<=n;i++)
 8     {
 9         cin >> a >> b >> c;
10         if (a*a+b*b==c*c || a*a+c*c==b*b || b*b+c*c==a*a)
11         {
12             cout << "Scenario #" << i << ":" << endl << "yes" << endl << endl;
13         }
14         else
15         {
16             cout << "Scenario #" << i << ":" << endl << "no" << endl << endl;
17         }
18     }
19     return 0;
20 }

 

posted on 2012-12-11 16:35  猿人谷  阅读(391)  评论(0编辑  收藏  举报