Problem in the code


please tell what is the problem that all test cases are not passed i followed the same logic told in the hint

hi @himanshuanand729, refer
do k = k%n as it will help in avoiding TLE