k번째 수

이세진·2022년 4월 15일
0

코테준비

목록 보기
2/87

생성일: 2022년 1월 6일 오전 1:25

구현 코드

# k번째 수
import sys
#sys.stdin = open("in1.txt", "rt")
T = int(input())
for t in range(T):
    n, s, e, k = map(int, input().split())
    numList = list(map(int, input().split()))
    numList = numList[s-1:e]
    numList.sort()
    print(f"#{t+1} {numList[k-1]}")
profile
나중은 결코 오지 않는다.

0개의 댓글