98.8k views
2 votes
We call a number special if every digit in the number either is a 1 or borders a 1. For example, 11111, 13, 141, 1441, 515151, and 101 are all special, but 10001, 222, 122, and 1333 are not special. How many positive 3-digit numbers are special?

User Jschlereth
by
8.1k points

1 Answer

4 votes

Let us say that:

T = numbers from 2-9
Z = numbers from 0-9
X = all except 1 (0, 2-9)

If a number begins with 1:
1 _ _
Then we can have
1 1 Z (10 numbers)
1 X 1 (9 numbers)
So a total of 19.

Now if a number starts with 2-9
T _ _
The second digit must be 1

T 1 _
but the third can be anything so
T 1 Z = 8 * 1 * 10 = 90 numbers

Total = 99

User Manolete
by
8.4k points