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 }
本文转自夏雪冬日博客园博客,原文链接:http://www.cnblogs.com/heyonggang/archive/2012/12/11/2813185.html,如需转载请自行联系原作者