Bunuel
What is the number of integer between 1 and 10000 with a least one 8 and at least one 9 as digits ?
A. 970
B. 971
C. 972
D. 973
E. 974
We need to divide and conquer for this question, I pick out the possible scenarios then multiply the number of scrambles for each scenario.
Case 1: 4 unique digit's, (e.g. 8901, 0198). We can describe this as 8 9 A B, the two blanks have 8 options and 7 options (include 0 as an option). This would have \(1*1*(8C2)\) cases and each case has 4! scrambles, resulting in \(28*4! = 672\) numbers.
Case 2: 8*9 AA, where A is 0 to 7. Each case has \(\frac{4!}{2}\) scrambles so \(8*4! / 2 = 96\) numbers.
Case 3: 8988 or 8999, scambled. Only two cases and each has 4 scrambles, 8 numbers total.
Case 4: 89 + (8 or 9) + (0 to 7). (E.g. 8189, 9098). 2*8 cases and each case has \(\frac{4!}{2}\) scrambles. \(16*12 = 192\) numbers.
Case 5: 8989 scrambled, \(\frac{4!}{(2*2)} = 6\) cases.
In total we have 672 + 96 + 8 + 192 + 6 = 974 cases.
Ans: E