Run ID:106607
提交时间:2025-01-16 14:05:47
#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; }