The given problem can be formulated as :
x1 + x2 + x3 = 10 subjected to constraints :
0 <= x1 <= 6 ,
0 <= x2 <= 7
0 <= x3 <= 8
So solution to the given problem is nothing but finding coefficient of x10 in (1 + x ..+ x6) . (1 + x .. + x7) . ( 1 + x ....+ x8)
==> coefficient of x10 in (1 - x7) . (1 - x8) . (1 - x9 ) .( 1 - x ) -3
Now out of the terms of (1 - x7) . (1 - x8) . (1 - x9 ) , we extract only those terms which contribute to x10 ..
So
(1 - x7 ) . (1 - x8 - x9 + x17 ) = 1 - x8 - x9 - x7 [ Only those terms which contribute to x10 are mentioned ]..
Now for each of the 4 terms we find the corresponding coefficient in ( 1 - x ) -3 and then finally sum up to find the answer.
So due to the term 1 , we have : 3-1+10C10 = 66
due to the term 2 , we have : 3-1+2C2 = 6
due to the term 2 , we have : 3-1+1C1 = 3
due to the term 2 , we have : 3-1+3C3 = 10
Hence , no of ways = 66 - 6 - 3 - 10
= 47
Hence 47 should be the correct answer.