Take the 2-minute tour ×
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|improve this question
How do you solve a zero percent accept rate? Do you know about accepting answers to your questions? and why that's considered a good thing to do? –  Gerry Myerson Jun 27 '12 at 0:29

2 Answers 2

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|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|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.