文章
19
粉丝
0
获赞
4
访问
11.3k
#include<bits/stdc++.h>
using namespace std;
int main() {
int arr[3];
int n;
cin >> n;
for (int i = 0; i < n; i++) {
cin >> arr[0] >> arr[1] >> arr[2];
sort(arr, arr + 3);
if (arr[0] == arr[1] && arr[0] == arr[2]) {
cout << "perfect" << endl;
}
else if (arr[0] * arr[0] + arr[1] * arr[1] == arr[2] * arr[2]) {
cout << "good" << endl;
}
else
{
cout << "bad" << endl;
}
}
}
登录后发布评论
暂无评论,来抢沙发