💻 하나씩 차곡차곡/프로그래머스 (Python)

[프로그래머스/Lv.1/Pyhton] K번째수

뚜루리 2024. 1. 24. 09:15
728x90
320x100
def solution(array, commands):
    answer = []
    
    for command in commands :
        list = array[command[0]-1:command[1]]
        list = sorted(list)
        answer.append(list[command[2]-1])
        
    return answer

 

728x90
320x100