• + 4 comments

    I thought my solution is neat. but here are more neat solutions!

    n, d = map(int, input().strip().split())
    arr = [int(arr_t) for arr_t in input().strip().split()]
    for _ in range(d):
        arr.append(arr.pop(0))
    print (*arr)