swerve wrote:Olive is creating a five-digit code using the digits 0 through 9. How many different codes can she create with exactly two prime digits if no digits can be repeated?
A. 252
B. 3,120
C. 3,456
D. 14,400
E. 30,240
The OA is D
Source: Economist GMAT
From 0 through 9, the prime digits are 2, 3, 5, and 7, and thus the non-prime digits are 0, 1, 4, 6, 8, and 9.
The number of ways to select the 2 prime digits is 4C2 = (4 x 3)/2 = 6.
The number of ways to select the 3 non-prime digits is 6C3 = (6 x 5 x 4)/(3 x 2) = 20.
Therefore, there are 6 x 20 = 120 ways to create these codes if order doesn't matter. However, for each code created, the order matters. For example, the code 27014 is different from 70412, 42017, etc. For each of 120 codes, since there are 5 different digits, there are 5! = 120 ways to arrange them. Thus the total number of codes can be created is:
120 x 120 = 14,400
Answer: D