Help in digit dp problem

Can someone help in this problem http://www.codechef.com/COOK65/problems/CHEFVEC. Editorial is not clear.