Skip to content
Related Articles

Related Articles

Algorithms Quiz | SP Contest 1 | Question 8
  • Difficulty Level : Medium
  • Last Updated : 11 Jul, 2018

How many numbers of 6 digits are possible with the property that the sum of their digits is 5?

(A) 96
(B) 104
(C) 120
(D) 126


Answer: (D)

Explanation: There are 6 digits and their sum is 5. So,

a + b + c + d + e + f = 5 

where,

1 ≤ a ≤ 9, and 0 ≤ b, c, d, e, f ≤ 9 

Therefore,

(a'+1) + b + c + d + e + f = 5
a' + b + c + d + e + f = 4 

Hence,



(4+5)C5 = 9C5 = 126 

So, option (D) is correct.

Refer method-2: Indistinguishable balls and Distinguishable boxes .

Quiz of this Question

Attention reader! Don’t stop learning now. Get hold of all the important DSA concepts with the DSA Self Paced Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :