본문 바로가기
💻 하나씩 차곡차곡/프로그래머스 (Python)

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

by 뚜루리 2024. 1. 24.
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