You are viewing a single comment's thread. Return to all comments →
I really like this one Zeus! I tried to make it more compact:
n, k, q = map(int, input().strip().split()) a = [int(i) for i in input().strip().split(' ')] for i in range(q): m = int(input()) print(a[(m-k)%n])
Seems like cookies are disabled on this browser, please enable them to open this website
Circular Array Rotation
You are viewing a single comment's thread. Return to all comments →
I really like this one Zeus! I tried to make it more compact: