• + 5 comments

    My solution in Python:

    n,d = map(int, raw_input().strip().split()) arr = map(int, raw_input().strip().split())

    print ' '.join(str(s) for s in (arr[d:] + arr[0:d]))