Placement AptitudeVery hardProduct company OA · CAT level

How many six-digit numbers (100000 to 999999) have digits that add up to 27?

  1. A. 50412
  2. B. 55252
  3. C. 49852
  4. D. 45760

Correct answer: A. 50412

Count digit strings (leading zeros allowed) with each digit 0–9. Six digits summing to 27: C(32,5) − 6·C(22,5) + 15·C(12,5) = 201376 − 158004 + 11880 = 55252. Strings starting with 0 are five-digit strings summing to 27: C(31,4) − 5·C(21,4) + 10·C(11,4) = 31465 − 29925 + 3300 = 4840. Six-digit numbers: 55252 − 4840 = 50412. 55252 forgets that the first digit cannot be 0.

More Permutations, Combinations and Probability (Placement) questions

Exams that ask this topic