• + 7 comments

    What's the space and time efficiency for this code?

    n, k, m = map(int, input().strip().split())
    arr = list(map(int, input().strip().split()))
    k %= n
    arr = arr[-k:] + arr[:-k]
    for i in range(m):
        print(arr[int(input().strip())])