프로그래머스 K번째수
def solution(array, commands): answer = [] size = len(commands) for index in range(size): i, j, k = commands[index] temp = array[i-1:j] temp = sorted(temp) temp = temp[k -1] answer.append(temp) return answer