diff --git a/Week2_HW1 b/Week2_HW1 new file mode 100644 index 0000000..cd88d50 --- /dev/null +++ b/Week2_HW1 @@ -0,0 +1,18 @@ +//220403 +//프로그래머스 코딩테스트 연습 K번째수 +//https://programmers.co.kr/learn/courses/30/lessons/42748 + +def solution(array, commands): + answer = [] + for a in range(len(commands)): + i = commands[a][0] + j = commands[a][1] + k = commands[a][2] + + new = array[i-1:j] + new.sort() + output = new[k-1] + answer.append(output) + new = [] + + return answer