wlsgud2075   2년 전

a, b = list(map(int,input().split()))
l = [i for i in range(1,a+1)]
for i in range(b):
    c,d = list(map(int,input().split()))
    l[c-1:d] = l[c-1:d][::-1]
print(l)


어떤 부분에서 틀렸을까요?

protarie   2년 전

출력형식이 틀렸습니다.

(그러므로 예제도 틀렸습니다.)

wlsgud2075   2년 전

감사합니다.

댓글을 작성하려면 로그인해야 합니다.