Q9: Within a given area code, how many seven-digit numbers are available, given the restriction that the first three digits cannot be 911 or 411 and the first digit cannot be a 1 or a 0?
My solution is : total options is 10 * 10 * 10 * 10 * 10 * 10 * 10 = 10^7
since first digit cannot be a 1 or a 0, then minus 10 * 10 * 10 * 10 * 10 * 10 (the first digit must be 1) and 10 * 10 * 10 * 10 * 10 * 10 ( (the first digit must be 0). It will be 8 * 10 * 10 * 10 * 10 * 10 * 10.
When the first three digits must be 911, it has 10 * 10 * 10 * 10.
When the first three digits must be 411, it has 10 * 10 * 10 * 10.
Thus, final result is 8 * 10 * 10 * 10 * 10 * 10 * 10 - 10 * 10 * 10 * 10 - 10 * 10 * 10 * 10 = 7,980,000
What I did is to try all choices such that a * 1/a = 1.
先算三个交集的人数,再用总数减去这个数既是答案。
(18-10)+ ( 25-10) + (15-10) +10 = 38
50-38 = 12
The median is not average of 9th and 10th numbers
No comments:
Post a Comment