Linklist k append

what is the problem in my code , i am failing some of the test cases

after taking input key you need to replace it with key%n.
Corrected Code