How many positive integers less than 1000 are there which contain at least one 4 or at least one 9 (or both)?

$\begingroup$

How many positive integers less than 1000 are there which contain at least one 4 or at least one 9 (or both)?

Obviously theres 100 in 400's and 900's but short of counting every other number whats the quickest way to work this out?

$\endgroup$ 1

1 Answer

$\begingroup$

There are $8^3-1$ numbers that contain neither $4$ nor $9$. (The $-1$ is because $000$ doesn't count).

Subtract that from the total number of integers less than $1000$.


Of course, since $0$ doesn't have a $4$ or $9$ anyway, you could equally well ask about non-negative integers less than $1000$, in which case you'd just subtract $8^3$ from $10^3$, getting the same result.

$\endgroup$

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like