How many numbers are there between 100 and 1000 such that
exactly one digit is 5
Answers
First, three-digit numbers having only one 5:
There are (1*9*9 + 8*1*9 + 8*9*1) = (81 + 72 + 72) = 225 such numbers.
1*9*9…………………………where 5 occupies the hundred’s place
8*1*9…………………………where 5 occupies the ten’s place (0 can’t occupy the hundred’s place)
8*9*1…………………………where 5 occupies the unit’s place (0 can’t occupy the hundred’s place)
Second, three-digit numbers having two 5s:
There are (1*1*9 + 8*1*1 + 1*9*1) = (9 + 8 + 9) = 26 such numbers.
1*1*9…………………………where 5 occupies the hundred’s and ten’s places
8*1*1…………………………where 5 occupies the ten’s and unit’s places (0 can’t occupy the hundred’s place)
1*9*1…………………………where 5 occupies the hundred’s and unit’s places
Third, three-digit numbers having three 5s:
There is (1*1*1) = 1 such number.
So, the answer will be (225 + 26 + 1) = 252.
Therefore, there are 252 numbers between 100 and 1000 such that they have 5 as at least one of the digits.
Hope it helps:-)
Answer:
Therefore, there are 252 numbers between 100 and 1000 such that they have 5 as at least one of the digits.
Step-by-step explanation:
Look, 100 is the least among all three-digit numbers and 1000 is the least among all four-digit numbers. So, we are basically to look for all three-digit numbers having the digit 5.
First, three-digit numbers having only one 5:
There are (1*9*9 + 8*1*9 + 8*9*1) = (81 + 72 + 72) = 225 such numbers.
1*9*9…………………………where 5 occupies the hundred’s place
8*1*9…………………………where 5 occupies the ten’s place (0 can’t occupy the hundred’s place)
8*9*1…………………………where 5 occupies the unit’s place (0 can’t occupy the hundred’s place)
Second, three-digit numbers having two 5s:
There are (1*1*9 + 8*1*1 + 1*9*1) = (9 + 8 + 9) = 26 such numbers.
1*1*9…………………………where 5 occupies the hundred’s and ten’s places
8*1*1…………………………where 5 occupies the ten’s and unit’s places (0 can’t occupy the hundred’s place)
1*9*1…………………………where 5 occupies the hundred’s and unit’s places
Third, three-digit numbers having three 5s:
There is (1*1*1) = 1 such number.
So, the answer will be (225 + 26 + 1) = 252.