<p>Given an array of integers <code>cost</code> and an integer <code>target</code>, return <em>the <strong>maximum</strong> integer you can paint under the following rules</em>:</p>
<ul>
<li>The cost of painting a digit <code>(i + 1)</code> is given by <code>cost[i]</code> (<strong>0-indexed</strong>).</li>
<li>The total cost used must be equal to <code>target</code>.</li>
<li>The integer does not have <code>0</code> digits.</li>
</ul>
<p>Since the answer may be very large, return it as a string. If there is no way to paint any integer given the condition, return <code>"0"</code>.</p>
<strong>Explanation:</strong> The cost to paint the digit '7' is 2, and the digit '2' is 3. Then cost("7772") = 2*3+ 3*1 = 9. You could also paint "977", but "7772" is the largest number.