Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
106607 6张轶涵 判断三角形形状 C++ Accepted 3 MS 268 KB 349 2025-01-16 14:05:47

Tests(1/1):


Code:

#include <bits/stdc++.h> using namespace std; int main() { int a,b,c; int n; cin>>n; while(n--) { cin>>a>>b>>c; if(a==b||a==c||b==c) { cout<<"perfect"<<endl; } else if(a*a+b*b==c*c||a*a+c*c==b*b||c*c+b*b==a*a) { cout<<"good"<<endl; } else{ cout<<"just a triangle"<<endl; } } return 0; }