Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
2065 | 杨洋杰 | 11判断三角形 | C++ | Accepted | 0 MS | 260 KB | 782 | 2023-12-09 16:53:36 |
#include<iostream> using namespace std; int main(){ long long a,b,c,l=0; cin>>a>>b>>c; if(a+b>c && a+c>b && b+c>a){ if(a==b&&a==c&&b==c){ cout<<"Equilateral Triangle"<<endl; return 0; } else l++; if(a==b&&a!=c||a==c&&a!=b||b==c&&b!=a){ cout<<"Isosceles Triangle"<<endl; return 0; } else l++; if(a*a+b*b==c*c||a*a+c*c==b*b||c*c+b*b==a*a){ cout<<"Right Triangle"<<endl; return 0; } else l++; if(l==3) cout<<"Simple Triangle"<<endl; } else cout<<"No"<<endl; return 0; }