백준 - 4153 직각삼각형
문제 4153 직각삼각형 답 kotlin code fun main() { val output = StringBuilder() while (true) { readln().run { val (a, b, c) = this.split(" ").map { it.toInt() * it.toInt() }.sor...
문제 4153 직각삼각형 답 kotlin code fun main() { val output = StringBuilder() while (true) { readln().run { val (a, b, c) = this.split(" ").map { it.toInt() * it.toInt() }.sor...
문제 2231 분해합 답 kotlin code fun main() { val input = readln().toInt() for(n in input/2 until input) { val digitSum = "$n".sumOf { it - '0' } if(input == (n + digitSum)) { ...
문제 2667 단지번호붙이기 답 kotlin code fun main() { val xyCount = readln().toInt() val square = Array(xyCount) { readln().toCharArray().map { if(it == '1') -1 else it.digitToInt() }.toIntArray() }...
문제 3009 네 번째 점 답 kotlin code fun main() { val lines = Array(3) { readln().split(" ").map { it.toInt() }.toPair() } val x = lines.map { it.first }.groupingBy { it }.eachCount().filter { i...
문제 2798 블랙잭 답 kotlin code fun main() { val target: Int var max = 0 readln().split(" ").map { it.toInt() }.let { target = it.last() } val cards = readln().split(" ").map { it.toIn...