https://school.programmers.co.kr/learn/courses/30/lessons/42748
프로그래머스
코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요.
programmers.co.kr
def solution(array, commands):
answer = []
for i in range(len(commands)):
start = commands[i][0]
end = commands[i][1]
num = commands[i][2]
tmp = array[start-1:end]
tmp.sort()
answer.append(tmp[num-1])
return answer
'[개발]programmers > Python3' 카테고리의 다른 글
Lv.1_[1차] 비밀지도 (0) | 2023.02.22 |
---|---|
Lv.1_숫자 문자열과 영단어 (0) | 2023.02.21 |
Lv.1_두 개 뽑아서 더하기 (0) | 2023.02.21 |
Lv.1_문자열 내 마음대로 정렬하기 (0) | 2023.02.21 |
Lv.2_H-Index (0) | 2023.02.20 |