while true {
let input = readLine()!.split(separator: " ").map{Int($0)!}
let one = input[0]
let two = input[1]
let three = input[2]
if one == 0 && two == 0 && three == 0 {
break
}
var arr:[Int] = []
arr.append(one)
arr.append(two)
arr.append(three)
arr.sort{$0<$1}
if arr[0] * arr[0] + arr[1] * arr[1] == arr[2] * arr[2]{
print("right")
}else {
print("wrong")
}
}
'코테 > 백준' 카테고리의 다른 글
[백준] 1002 터렛 스위프트 (0) | 2022.01.08 |
---|---|
[백준] 3053 택시 기하학 스위프트 (0) | 2022.01.08 |
[백준] 1085 직사각형에서 탈출 스위프트 (0) | 2022.01.07 |
[백준] 3009 네번째점 스위프트 (0) | 2022.01.07 |
[백준] 9020 골드바흐의 추측 스위프트 (0) | 2022.01.06 |
댓글