Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
139568 胡海峰老师 11判断三角形 C++ Accepted 0 MS 272 KB 604 2025-12-08 09:14:34

Tests(10/10):


Code:

#include <iostream> //designed by hu 2025-10 using namespace std; int main(){ int a,b,c; cin>>a>>b>>c; if(a==b && b==c){ cout<<"Equilateral Triangle"; return 0; } if(a+b<=c || a+c<=b || b+c<=a ) { cout<< "No"; return 0; // terminate the program } if( a==b || b==c || c==a) { cout<<"Isosceles Triangle"; return 0; } if(a*a+b*b== c*c || c*c+b*b== a*a || a*a+c*c== b*b ){ cout<<"Right Triangle"; return 0; } cout<<"Simple Triangle"; return 0; } //https://www.bilibili.com/video/BV1jvcbeiENC?p=11&spm_id_from=333.788.videopod.episodes