Consider a string of n 1’s. We wish to place some + signs in between so that the sum is 1000. For instance, if n = 190 , one may put + signs so as to get 11 ninety times and 1 ten times, and get the sum 1000. If a is the number of positive integers n for which it is possible to place + signs so as to get the sum 1000, then find the sum of the digits of a.
This is the real problem. I've written the simplified version ( what we actually need to find ) in the title.
I used the following method to solve this question :
Since the sum should be thousand we won't take strings greater than 111. So, we basically have to solve
$ 111A + 11B + C = 1000 $
We can easily solve this by counting the cases -
$A = 0$ $B = 0$ $C$ has $1$ value
$A = 9$ $B= 0$ $C$ has $1$ value
$A = 8$ $B = 0,1,2,..,10$ $C$ has $11$ values
$A = 7$ $B = 0,1,2,...,20$ $C$ has $21$ values
$A = 6$ $B = 0,1,2,...,30$ $C$ has $31$ values
$A = 5$ $B = 0,1,2,...,40$ $C$ has $41$ values
$A = 4$ $B = 0,1,2,...,50$ $C$ has $51$ values
$A = 3$ $B = 0,1,2,...,60$ $C$ has $61$ values
$A = 2$ $B = 0,1,2,...,70$ $C$ has $71$ values
$A = 1$ $B = 0,1,2,...,80$ $C$ has $81$ values
So, there are $460$ cases in total. But the problem is, that for all of these $460$ cases
$3A$ + $2B$ + $C$ is not unique. So, how should I proceed ?