2 problems found
In this question, \(x\), \(y\) and \(z\) are real numbers. Let \(\lfloor x \rfloor\) denote the largest integer that satisfies \(\lfloor x \rfloor \leqslant x\) and let \(\{x\}\) denote the fractional part of~\(x\), so that \(x = \lfloor x \rfloor + \{x\}\) and \(0 \leqslant \{x\} < 1\). For example, if \(x = 4.2\), then \(\lfloor x \rfloor = 4\) and \(\{x\} = 0.2\) and if \(x = -4.2\), then \(\lfloor x \rfloor = -5\) and \(\{x\} = 0.8\).
How many integers between \(10\,000\) and \(100\,000\) (inclusive) contain exactly two different digits? (\(23\,332\) contains exactly two different digits but neither of \(33\,333\) and \(12\,331\) does.)
Solution: First consider \(5\) digit numbers containing at most \(2\) non-zero digits. Then there are \(\binom{9}{2}\) ways to choose the two digits, and \(2^{5}-2\) different ways to arrange them, removing the ones which are all the same. Considering all the pairs including zero, there are \(9\) ways to choose the non-zero (first) digit. There are \(2^4-1\) remaining digits where not all the numbers are the same. Finally we must not forget \(100\,000\). Therefore there are \(\binom{9}{2}(2^5-2) +9\cdot(2^4-1) + 1 = 1216\)