give array integer cost integer target return maximum integer paint follow rulesThe cost painting digit 1 give costi 0indexedthe total cost equal targetthe integer 0 digitssince answer large return string if way paint integer give condition return 0 example 1input cost 432567255 target 9output 7772explanation the cost paint digit 7 2 digit 2 3 then cost7772 23 31 9 you paint 977 7772 large numberDigit cost 1 4 2 3 3 2 4 5 5 6 6 7 7 2 8 5 9 5example 2input cost 765556878 target 12output 85explanation the cost paint digit 8 7 digit 5 5 then cost85 7 5 12example 3input cost 246246444 target 5output 0explanation it impossible paint integer total cost equal target Constraintscostlength 91 costi target 5000