Mathematics (JEE)HardCodeforces Div2 D

How many 8-tuples of integers (y1, ..., y8) satisfy y1 + ... + y8 = 15 with 1 <= yi <= 3 for every i?

  1. A. 3432
  2. B. 8
  3. C. 5328
  4. D. 1016

Correct answer: D. 1016

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

More Permutations, Combinations and Probability questions

Exams that ask this topic