import java.util.Scanner;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
while(true) {
int x = in.nextInt();
int y = in.nextInt();
int z = in.nextInt();
// 0 0 0 을 입력받으면 종료
if(x == 0 && y == 0 && z == 0) break;
if((x * x + y * y) == z * z) {
System.out.println("right");
}
else if(x * x == (y * y + z * z)) {
System.out.println("right");
}
else if(y * y == (z * z + x * x)) {
System.out.println("right");
}
else {
System.out.println("wrong");
}
}
}
}
'컴공 공부 > 백준' 카테고리의 다른 글
[백준 알고리즘] 3053번 택시기하학 C언어 (0) | 2021.01.29 |
---|---|
[백준알고리즘] 3053번 택시기하학 자바 (0) | 2021.01.29 |
[백준 알고리즘] 4153번 직각삼각형 C언어 (0) | 2021.01.07 |
[백준 알고리즘] 3009번 네번째 점 C언어 (0) | 2021.01.07 |
[백준 알고리즘] 3009번 네번째 점 자바 (0) | 2021.01.07 |