Full of two's and five's

How many numbers of three digits are such that have at least one 2 and one 5?


The answer is 52.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

1 solution

Paola Ramírez
Apr 18, 2015

Case 1: A number of formed by b , b , a {b,b,a} only can be arrangement of three ways so we have two posibilities b = 5 , 2 b=5, 2 . 6 \boxed{6}

Case 2: Three different digits a , b , c {a,b,c}

Let a = 2 a=2 and b = 5 b=5 , this numbers can be arrangement in ( 3 2 ) \binom{3}{2} ways and permuted of two forms, a a and b b can be arrangement of 6 6 forms.

Then c = 8 c=8 because you cannot repeat 5 5 and 2 2 . Also delete arrangements 052 052 and 025 025

By this case we have 6 × 8 2 = 46 6\times 8-2=\boxed{46}

Total of numbers 6 + 46 = 52 6+46=\boxed{52}

I keep getting 452 as my answer.

There are 9x10x10 = 900 three-digit numbers and there are 7x8x8 = 448 numbers that don't have any digits that are either a 2 or 5. Thus, there should be 900 - 448 = 452 three-digit numbers that have at least one digit that is either a 2 or 5.

This can also be confirmed with a Python program:

count = 0
for a in range(100, 1000):
  if ("2" in list(str(a))) or ("5" in list(str(a))):
                               count+=1

print (count)

Again, the program returns 452 as the answer.

Mark Mottian - 6 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...