head
,旋转链表,将链表每个节点向右移动 k
个位置。items = list(map(int, input().split(","))) k = int(input()) link = [] head = 0 for i in items: link.append([i, len(link) + 1]) link[-1][1] = -1 ... ... p = head while p != -1: print(link[p][0], end=",") p = link[p][1]