SWE 5108 - 숫자 추가
TC = int(input())
for tc in range(1, TC+1):
    N, M, L = map(int, input().split())
    arr = list(map(int, input().split()))
    for i in range(M):
        a, b = map(int, input().split())
        arr.insert(a, b)
    print("#%s %d" % (tc, arr[L]))
참고자료 [SWexperacademy]https://swexpertacademy.com