DevYoon
[프로그래머스] K번째 수 (Python) 본문
link 🔗 https://programmers.co.kr/learn/courses/30/lessons/42748
def solution(array, commands):
answer = []
for c in commands:
lst = sorted(array[c[0]-1:c[1]])
answer.append(lst[c[2]-1])
return answer