K Append LL Question

Not passing second test case what is the reason??I am not able to figure out

@aryamaan1011 hey do kk%length of linked list in starting as k range can exceed length of linked list so that’s why we have to do this.

How is k*k%N different from k%N it doesnt make sense?

Even after doing k%N i am not passing the second test case and if we do k%N k never exceeds value of N according to given constraints

@ hey I was asking to do k=k%length of linked list in starting