Mathematics (JEE)HardCodeforces Div2 D

How many 5-tuples of integers (x1, ..., x5) satisfy x1 + ... + x5 = 25 with 1 <= xi <= 8 for every i?

  1. A. 10626
  2. B. 826
  3. C. 2826
  4. D. 2226

Correct answer: D. 2226

Shift each xi by subtracting 1 to get yi in [0,7] with sum 20; inclusion-exclusion over the variables exceeding 7 gives 2226.

More Permutations, Combinations and Probability questions

Exams that ask this topic