static void Main(string[] args)
Console.WriteLine("Hello World!");
int[] arr = solution(new int[] { 3, 8, 9, 7, 6 }, 3);
Console.WriteLine("[{0}]", string.Join(", ", arr));
arr = solution(new int[] { 1, 2, 3, 4 }, 4);
Console.WriteLine("[{0}]", string.Join(", ", arr));
arr = solution(new int[] { 1, 2, 3, 4 }, 16);
Console.WriteLine("[{0}]", string.Join(", ", arr));
arr = solution(new int[] { 3, 8, 9, 7, 6 }, 1);
Console.WriteLine("[{0}]", string.Join(", ", arr));
arr = solution(new int[] { 3, 8, 9, 7, 6 }, 20);
Console.WriteLine("[{0}]", string.Join(", ", arr));
public static int[] solution(int[] A, int K)
int[] result = new int[N];
for(int i = 0; i < N; i++){
int new_ind = (i + K) % N;