title: finding out the maximum number if cost is associated with using each digit
body: <p>I have been given the total money I have. Now I know the cost it takes to write down each digit (1 to 9). So how to create a maximum number out of it? Is there any dynamic programming approach for this problem?</p>
  
  <p>Example:</p>
  
  <p>total money available = 2<br>
  cost of each digit (1 to 9) = <code>9, 11, 1, 12, 5, 8, 9, 10, 6</code><br>
  output:33</p>