Bunuel
How many positive 3-digit integers have the sum of their digits less than 5?
A. 17
B. 18
C. 19
D. 20
E. 21
The sum of digits <5, so only 3 possibilities
SUM=4
1) Digits are 4, 0, 0
First place can be taken by 1, and remaining two by 0.
Only one number can be made 400
2) Digits are 3, 1, 0.....say number is XYZ
Hundreds digit, X, can be taken by 3 or 1....Tens by remaining one and 0 => 2*2=4
3) Digits are 2, 1, 1.....say number is XYZ
Ways to arrange these =3!/2!=3 ways
4) Digits are 2, 2, 0.....say number is XYZ
Ways to arrange these =2 ways
SUM=3
1) Digits are 3, 0, 0
First place can be taken by 1, and remaining two by 0.
Only one number can be made 300
2) Digits are 2, 1, 0.....say number is XYZ
Hundreds digit, X, can be taken by 2 or 1....Tens by remaining one and 0 => 2*2=4
3) Digits are 1, 1, 1.....Only 1 way
SUM=2
1) Digits are 2, 0, 0
First place can be taken by 1, and remaining two by 0.
Only one number can be made 200
2) Digits are 1, 1, 0.....say number is XYZ
Hundreds digit, X, can be taken by 1....Tens by remaining one and 0 => 1*2=2
SUM=1
1) Digits are 1, 0, 0
First place can be taken by 1, and remaining two by 0.
Only one number can be made 100
Total 1+4+3+1+4+1+1+2+1+2= 20.
Or
Keep it very simple
you can just check for hundreds, tens, and ones digit as given in attached figure
Attachments

Table.png [ 22.04 KiB | Viewed 5713 times ]