Maximize Sum of Squares of Digits
Squares are largest when digits are pushed to the extremes, so fill with as many 9s as the sum allows, one leftover digit, then zeros.
Squares are largest when digits are pushed to the extremes, so fill with as many 9s as the sum allows, one leftover digit, then zeros.