-
카테고리
-
세부 분야
알고리즘 · 자료구조
-
해결 여부
미해결
채점기 작동오류
22.12.07 21:20 작성 조회수 240
0
채점을 하려는데 이런 오류가 뜨고 있습니다.
코드는
import sys
#sys.stdin = open('input.txt','rt')
T = int(input())
for t in range(T):
n, s, e, k = map(int, input().split())
a = list(map(int, input().split()))
print('#{} {}'.format(t+1, sorted(a[s-1:e])[k-1]))
입니다.
답변을 작성해보세요.
0
김태원
지식공유자2022.12.12
안녕하세요^^
아래 코드가 제 컴퓨터에서는 정상적으로 100점 나옵니다.
import sys
#sys.stdin = open('input.txt','rt')
T = int(input())
for t in range(T):
n, s, e, k = map(int, input().split())
a = list(map(int, input().split()))
print('#{} {}'.format(t+1, sorted(a[s-1:e])[k-1]))
답변 1