Help in solution of a Problem..

I have been trying to solve this problem for more than a week but till can’t even get near the concept to implement.
Problem Code CDMN17C
request to coding geeks just to put on their coding hats.

//