class Solution:
    def FindKthToTail(self , pHead: ListNode, k: int) -> ListNode:
        # write code here
        
        if not pHead:
            return
        
        p1, p2 = pHead, pHead
        
        while k: # 以k为0而不以快指针为空作为循环出口,再循环中,若k不为0是快指针为空,返回失败
            if not p2:
                return
            
            k -= 1
            p2 = p2.next
            
            
        while p2:
            p1 = p1.next
            p2 = p2.next
        
        return p1