정적분

    Programmers :: 연습문제 :: 우박수열 정적분

    풀이 import kotlin.math.absoluteValue class 우박수열_정적분 { fun solution(k: Int, ranges: Array): DoubleArray { val hailElements = hailSequence(k.toDouble()) val hailSizes = calcSizeOfHail(hailElements) val answer = getSolution(hailElements.size, ranges, hailSizes) return answer.toDoubleArray() } fun getSolution(hailLength: Int, ranges: Array, sizes: List): List{ val solution = mutableListOf() for(range..

728x90