Question 775339: There are 900 three-digit integers. The number of three-digit integers having at least one repeated digit is also a three-digit number. If that number is represented by abc where each letter is a digit compute a-b+c.
Answer by KMST(5328) (Show Source):
You can put this solution on YOUR website! I may be missing something but here is my calculation.
Zeros are a problem, because numbers sequences odf digits like 001 or 011 are not 3-digit numbers. So it is best to treat zero separately.
If zero is one of the digits, it could appear twice, necessarily at the end, in 3-digit numbers: 100, 200, ...800, and 900.
It could also appear once at the end in an additional 3-digit numbers: 110, 220, ...880, and 990.
It could also appear once in the middle in an additional 3-digit numbers: 101, 202, ...808, and 909.
There are also 3-digit numbers made of the same repeating digit: 111, 222, ... 888, 999.
Besides the number we already listed, there are 3-digit numbers made of two non-zero digits, digit x appearing twice, and digit y appearing only once.
There are 9 ways to choose x, and for each of those there are 8 ways to choose y, for a total of ordered pairs (x,y).
For each ordered pair, there are 3 positions where we can place y: at the beginning, in the middle, or at the end. That gives us
3-digit numbers made of two non-zero digits.
If I haven't missed any, and I have not counted any number more than once, that gives me
three-digit integers having at least one repeated digit.
With I get
|
|
|