How many positive integers have less than $90000$ have the sum of their digits equal to $17$? How many positive integers have less than $90000$ have the sum of their digits equal to $17$?
I tried to write the number as $ABCDE$ and use some math with that (so we need $A + B + C + D + E = 17$), and I tried to use stars and bars, but I got no progress.
Can someone please help me?

Not an answer, just hard to put in a comment. Python code.
c = 0
for i in range(1,90000):
    if sum(map(int,list(str(i))))==17:
        c += 1
print c 

