Sign up ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

How many positive, three-digit integers contain at least one $3$ as a digit but do not contain $5$ as a digit?

I have an answer for that which is $215$ ,is that right ?

If its wrong then ,how to solve it?

share|cite|improve this question

3 Answers 3

I think your number is a little high. Take the number of 3-digit integers that contain no 5 and subtract the number of 3-digit numbers that contain no 5 and no 3.

share|cite|improve this answer

Let us consider the number of three-digit integers that do not contain $3$ and $5$ as digits; let this set be $S$. For any such number, there would be $7$ possible choices for the hundreds digit (excluding $0,3$, and $5$), and $8$ possible choices for each of the tens and ones digits. Thus, there are $7 \cdot 8 \cdot 8 = 448$ three-digit integers without a $3$ or $ 5$.

Now, we count the number of three-digit integers that just do not contain a $5$ as a digit; let this set be $T$. There would be $8$ possible choices for the hundreds digit, and $9$ for each of the others, giving $8 \cdot 9 \cdot 9 = 648$.

By the complementary principle, the set of three-digit integers with at least one $3$ and no $5$'s is the number of integers in $T$ but not $S$. There are $648 - 448 = 200$ such numbers.

share|cite|improve this answer

The number of three-digit natural numbers starting with 3, but without 5 as a digit is 9*9.

Similarly, for the middle-digit & the least-digit the number of such natural numbers is (in each case) 8*9 as 0 can not be the starting digit.

So, the required number of three-digit natural numbers is 72+72+81=225.

2nd approach:

The de facto way of solving problems with 'at least one' is to finding the solution of the reverse i.e., containing none, then subtract from the universal set.

Here the number of three number is (999-100)+1=900.

Now, if no digit is 3, then the highest digits can be one of 0 to 9 excluding 0,3 as 0 will reduce the number to 2-digit. So, the highest can accept 8 possible values.

The rest two digits each can accept one of 0 to 9 excluding 3.

The number of numbers which don't contain 3 as any digit, is 8*9*9=728.

So, the number of numbers which contain 3 as at least one digit, is = 900-728=252.

As observed by Brandon Carter in the 1st solution, it contains duplicates like 333. More over, it does not include the exhaustive set either. What are missing?

share|cite|improve this answer
You are counting the same number several times. 333, for example, falls into all 3 categories. – Brandon Carter Jul 11 '12 at 6:29
What other numbers get repeated? – lab bhattacharjee Jul 14 '12 at 14:06
Lots of them. Think about it. – Brandon Carter Jul 14 '12 at 15:49

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.