首页 > 代码库 > hdu 2393 Higher Math
hdu 2393 Higher Math
Higher Math
Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 2291 Accepted Submission(s): 1262
#include<iostream> #include<cstdio> #include<cstring> #include<algorithm> using namespace std; int max(int a,int b) { int T; if(a>b) { T=a; a=b; b=T; } return b; } int main() { __int64 a[5]; int cas; cin>>cas; int t=1; while(cas--) { cin>>a[1]>>a[2]>>a[3]; cout<<"Scenario #"<<t<<":"<<endl; if(a[1]&&a[2]&&a[3]) { sort(a+1,a+4); if(a[3]*a[3]==a[2]*a[2]+a[1]*a[1]) cout<<"yes"<<endl<<endl; else cout<<"no"<<endl<<endl; } else cout<<"no"<<endl<<endl; t++; } return 0; }
声明:以上内容来自用户投稿及互联网公开渠道收集整理发布,本网站不拥有所有权,未作人工编辑处理,也不承担相关法律责任,若内容有误或涉及侵权可进行投诉: 投诉/举报 工作人员会在5个工作日内联系你,一经查实,本站将立刻删除涉嫌侵权内容。