Need help with number theory problem.
problem link
Полный текст и комментарии »
Need help for the recursive dp code
Can someone provide the solution and recursive code for the problem DIV 2: C, thanks in advance for helping out.