Run ID:88698

提交时间:2024-08-20 15:45:22

t = int(input()) s = [] for i in range(t): while True: a,b,c = input().split() a,b,c = int(a),int(b),int(c) if a>0 and a<300 and b>0 and b<300 and c>0 and c<300: break if a == b or a == c or b == c: s.append('perfect') elif a**2 + b**2 == c**2: s.append('good') else: s.append('just a triangle') for i in s: print(i)