[프로그래머스] 연속된 수의 합 –



class Solution {
    fun solution(num: Int, total: Int): IntArray {
        return (total / num - (num - 1) / 2).let { 
            from -> IntArray(num) { idx -> idx + from } 
        }
    }
}