Run ID:165505

提交时间:2026-11-15 17:24:30

#include<iostream> using namespace std; int main() { int t,a,b,c; cin>>t; for(int i=1;i<=t;i++) { cin>>a>>b>>c; if(a*a==b*b+c*c || b*b==c*c+a*a || c*c==a*a+b*b) { cout<<"good"<<endl; } else if(a==b || a==c || b==c) { cout<<"perfect"<<endl; } else { cout<<"just a triangle"<<endl; } } return 0; }