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
'💻 하나씩 차곡차곡 > 프로그래머스 (Python)' 카테고리의 다른 글
[프로그래머스/Lv.1/Python] 모의고사 (0) | 2024.01.26 |
---|---|
[프로그래머스/Lv.2/Python] 가장 큰 수 (0) | 2024.01.25 |
[프로그래머스/Lv2/Python] 큰 수 만들기 (0) | 2024.01.23 |
[프로그래머스/Lv2/Python] 구명보트 (0) | 2024.01.22 |
[프로그래머스/Python] [PCCP 모의고사 #1] 1번 - 외톨이 알파벳 (0) | 2024.01.18 |