백준 - 4153 직각삼각형
문제
4153 직각삼각형
답
kotlin code
1
2
3
4
5
6
7
8
9
10
11
12
13
fun main() {
    val output = StringBuilder()
    while (true) {
        readln().run {
            val (a, b, c) = this.split(" ").map { it.toInt() * it.toInt() }.sorted()
            if (a + b + c == 0) {
                print(output)
                return
            }
            output.append(if (a + b == c) "right\n" else "wrong\n")
        }
    }
}
 This post is licensed under  CC BY 4.0  by the author.
