ques : https://hack.codingblocks.com/app/practice/1/317/problem
code : https://ide.codingblocks.com/s/215566
@chaman9 you need to do k = k%n after taking input.
thanks a lot… this worked