class Node(object):# 节点对象 def __init__(self,val=0): self.val = val self.next = None lineNum = 0 for line in sys.stdin: lineNum += 1 if lineNum % 3 == 1: n = int(line) if lineNum % 3 == 2: nums =list(map(int,line.split())) if lineNum % 3 == 0: k = int(line) # print(nums[-k]) head = Node(nums[0]) node = head for i in nums[1:]: node.next = Node(i) node = node.next fastNode = head slowNode = head for i in range(k): fastNode = fastNode.next while fastNode: fastNode = fastNode.next slowNode = slowNode.next print(slowNode.val)