L1 : K번째수 Python

jhyunn·2023년 1월 17일
0

Programmers

목록 보기
16/69

L1 : K번째수 Python

https://school.programmers.co.kr/learn/courses/30/lessons/42748

def solution(array, commands):
    answer = []
    for c in commands:
        answer.append(sorted(array[c[0]-1:c[1]])[c[2]-1])
    return answer
profile
https://github.com/Sungjeonghyun

0개의 댓글