# Moderate Number System Solved QuestionAptitude Discussion

 Q. When writing numbers from 1 to 10,000, how many times is the digit 9 written?
 ✖ A. 3200 ✖ B. 3600 ✔ C. 4000 ✖ D. 4200

Solution:
Option(C) is correct

The digits 9 occurs in the thousands place in 1000 numbers.

It occurs in the hundreds place in 1000 numbers and so on

The digit occurs 4000 times.

Edit: For an alternative solution, check comment by Sravan Reddy.

## (6) Comment(s)

Purushottam
()

Sets for XYZW

9 at all four places :9999. That is 4 times

9 at three places: 999W, 99Z9, 9Y99 and X999. That is 3x9x4=108

9 at two places: 99ZW, 9Y9W, 9YZ9, X99W, X9Z9 and XY99. That is 2x6x9^2=1272

9 at one place: 9YZW, X9ZW, XY9W and XYZ9. That is 4x729=2916

Total is 4200

Saumitra Srivastava
()

Try solving this by permutation and combination.

Excluding $10000$ since these is not any $9$ in it,

Four places are remaining for $1$ to $9999$

Thus every place can have $10$ digits so the total of such numbers is $10*10*10*10$ thus $10000$ including a zero thus $9999$.

And numbers having no $9$ digit in them can be counted by $9*9*9*9$ because to create all possible permutations in all of $10$ digits from $1$ to $10, 9$ can not be filled leading us to numbers having no $9$ equal to $6561$ and by subtracting.

$9999-6561 = 3438$ should be the answer.

Ritika
()

To me, this seems to be the wrong approach. By saying 'numbers having no $9$ digit in them can be counted by $9*9*9*9$' is wrong.

This approach will treat same numbers multiple times thus giving lesser count that the actual one.

For example, 0067 (contains no 9) and 067 and 67 all these are treated differently whereas they are the same.

Sravan Reddy
()

By writing all numbers in 4 digit form like 0000,0001,0002....0011,0012...0100,0101...1000,1001...9999.

There is total of 10,000 numbers above and all are 4 digit numbers.

So total digits used is 40,000 and due to symmetry each digit repeats equally. i.e, 4000 times.

GayathriRaju
()

I cant understand the answer in this question

Saustav
()

Hi

I calculated in excel, the total count comes to 3439.