# Moderate Permutation-Combination Solved QuestionAptitude Discussion

 Q. How many number of times will the digit $7$ be written when listing the integers from $1$ to $1000$?
 ✖ A. 271 ✔ B. 300 ✖ C. 252 ✖ D. 304

Solution:
Option(B) is correct

$7$ does not occur in $1000$. So we have to count the number of times it appears between $1$ and $999$. Any number between $1$ and $999$ can be expressed in the form of $xyz$ where $0 ≤ x, y, z ≤ 9$.

1. The numbers in which $7$ occurs only once. e.g. $7, 17, 78, 217, 743$ etc.

This means that $7$ is one of the digits and the remaining two digits will be any of the other $9$ digits (i.e, $0$ to $9$ with the exception of $7$)

You have $1×9×9 = 81$ such numbers.

However, $7$ could appear as the first or the second or the third digit.

Therefore, there will be $3×81 = 243$ numbers (1-digit, 2-digits and 3- digits) in which $7$ will appear only once.

In each of these numbers, $7$ is written once. Therefore, $243$ times.

2. The numbers in which $7$ will appear twice. e.g $772$ or $377$ or $747$ or $77$

In these numbers, one of the digits is not $7$ and it can be any of the $9$ digits ( $0$ to $9$ with the exception of $7$).

There will be $9$ such numbers. However, this digit which is not $7$ can appear in the first or second or the third place. So there are $3 × 9 = 27$ such numbers.

In each of these $27$ numbers, the digit $7$ is written twice. Therefore, $7$ is written $54$ times.

3. The number in which $7$ appears thrice : $777 – 1$ number. $7$ is written thrice in it.

Therefore, the total number of times the digit $7$ is written between $1$ and $999$ is,

$243 + 54 + 3$

$= \textbf{300 }$

## (4) Comment(s)

Naveen
()

All the numbers (0,1,2,...9) will be appearing equal number of times. The numbers are :

000 001 002 ..... ..... 999

So, there are a total of 3*1000 digits.

Now the number of times 7 will appear (or in fact any number 0,1,2,...9) will appear is = 3*1000/10 = 300.

Nischal
()

lets take the units place as 7

_ _ 7

no of ways to fill the tenth's place (0-9) = 10

no of ways to fill the hundred's place (0-9) = 10

total numbers of ways = 10*10*1

similarly,

tenth's place = 7

no of ways to fill the unit's place (0-9) = 10

no of ways to fill the hundred's place (0-9) = 10

total numbers of ways = 10*10*1

similarly,

hundred's place = 7

no of ways to fill the unit's place (0-9) = 10

no of ways to fill the tenth's place (0-9) = 10

total numbers of ways = 10*10*1

Final Answer = 100 + 100 + 100 = 300

Lokesh
()

Consider numbers from 0 to 999 written as follows:

1. 000

2. 001

3. 002

4. 003

...

...

...

1000. 999

We have $1000$ numbers. We used $3$ digits per number, hence used total of $3*1000$=$3000$ digits. Now, why should ANY digit have preferences over another? We used each of 10 digits equal number of times, thus we used each digit (including 7) $3000/10$=$300$ times.

This approach can be used for any number.

Parul
()

not able to understand