2,078 views

How many strings of $5$ digits have the property that the sum of their digits is $7$?

1. $66$
2. $330$
3. $495$
4. $99$

Let five digit A, B, C, D, E then A + B + C + D + E = 7

given n = 7, r = 5 we know that

n + r – 1 C  r - 1  = 7+5 -1 C 5-1 = 11 C 4 = 11x 10x9x8/1x2x3x4 =330

by

Let five digit A, B, C, D, E then A + B + C + D + E = 7

If A is 0 then it won't be 5 digit string.So, we consider this too..

Tell me if I am wrong..
It's saying "strings", not numbers... I think that's the catch
can someone give context for the formula used here. how is it used?’
This simple star-bar problem with IODB template where the a+b+c+d+e=7 which is equivalent to Combination with repitition, where content does not matters only order matters.

THere are 7 stars and 4 bars. (7+4)C4==330