| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 148138 | 李昊阳 | 判断三角形形状 | C++ | Accepted | 1 MS | 268 KB | 636 | 2026-02-09 17:26:13 |
#include <iostream> #include <algorithm> using namespace std; int main() { int t; cin >> t; while (t--) { long long a, b, c; cin >> a >> b >> c; // 判断直角三角形:先排序,让c为最大边 long long sides[3] = {a, b, c}; sort(sides, sides + 3); long long x = sides[0], y = sides[1], z = sides[2]; if (x * x + y * y == z * z) { cout << "good\n"; } else if (a == b || b == c || a == c) { cout << "perfect\n"; } else { cout << "just a triangle\n"; } } return 0; }