Introduction - If you have any usage issues, please Google them yourself
Throw six dice can throw out many permutations of it? As 123456 and 654321 is the same composition. Problem can be transformed into: n r identical balls into a different box, allowing the empty boxes. That solved indefinite equation x1+x2+x3+ ...+ xr = n of non-negative integer solutions (x1, x2, x3, ..., xr), 0 < = Xi < = n so yi = xi+1, into y1+y2+ ..+yr = n+r this case 1 < = yi < = n+1 equivalent n+r r balls into the heap, there are many kinds of issues of law that r-1 partition plates placed in this n+r-1 intervals, the ball separator between The number is equivalent to yi. answer is C (n+r-1, r-1) This procedure using VC++ solve the language problem.