Solution for NUKES

I’m not able to get a proper approach for solving NUKES problem.Can anyone suggest me an approach or required algorithm

Try solving the problem with smaller value of n and k on paper …And after that write all the results you got …After that try generalizing the solution for larger values and read the question again .

The problem is actually very simple you just need to take the division and the mod of the inputs till some instances …If you need more hints do prompt

Check here