How many three digit numbers are left if we exclude all three digit numbers in which there are exactly two digits the same, but these two digits are not adjacent?
There are 10^3 - 10^2 = 900 3-digit numbers with repeats allowed. If we begin with 1, we see the following pattern:
101, 121, 131, 141, 151, 161, 171, 181, 191. As you can see, no 2 SAME digits are adjacent to each other. This pattern holds for all remaining 8 numbers. Therefore, these numbers total: 9 x 9 = 81, which we must subtract from 900 above and we get:
900 - 81 = 819 3-digit numbers.