In an examination, there are 5 multiple choice questions with 3 choices, out of which exactly one is correct. There are 3 marks for each correct answer, −2 marks for each wrong answer, and 0 marks if the question is not attempted. Then the number of ways a student appearing in the examination gets 5 marks is \_\_\_
Answer: 40
Solutions · 1
Official solution
Let x = correct answers, y = incorrect answers, with 3x−2y=5 and x+y≤5.
The only solution in non-negative integers with x+y≤5 is (x,y)=(3,2).
For each correct answer, there's only 1 way (the correct choice); for each incorrect answer, there are 2 wrong choices to pick from.
\[\binom{5}{3}\times1^3\times2^2 = 10\times4 = 40\]