You are viewing a single comment's thread. Return to all comments →
python 3
size ,shift , queries = map(int , input().split()) l = list(map(int , input().split())) stind =size - shift%size while(queries>0): n =int(input()) print(l[(stind +n)%size]) queries -= 1
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 →
python 3