Correct
Solution (a)
We need to consider all three digit and all 4-digit numbers.
Three-digit numbers: A B C. 5 can be printed in the 100’s place or 10’s place or units place.
=> 100’s place: 5 B C.
B can take values 0 to 9, C can take values 0 to 9. So, 5 gets printed in the 100’s place 100 times
=> 10’s place: A 5 C. A can take values 1 to 9, C can take values 0 to 9. So, 5 gets printed in the 10’s place 90 times
=> Unit’s place: A B 5. A can take values 1 to 9, B can take values 0 to 9. So, 5 gets printed in the unit’s place 90 times So, 5 gets printed 280 times in 3-digit numbers
Four-digit numbers: A B C D. 5 can be printed in the 1000’s place, 100’s place or 10’s place or units place.
=> 1000’s place: 5 B C D. B can take values 0 to 9, C can take values 0 to 9, D can take values 0 to 9. So, 5 get printed in the 100’s place 1000 times.
=> 100’s place: A 5 C D. A can take values 1 to 9, C & D can take values 0 to 9. So, 5 gets printed in the 100’s place 900 times.
=> 10’s place: A B 5 D. A can take values 1 to 9, B & D can take values 0 to 9. So, 5 gets printed in the 10’s place 900 times.
=> Unit’s place: A B C 5. A can take values 1 to 9, B & C can take values 0 to 9. So, 5 gets printed in the unit’s place 900 times.
5 get printed 3700 times in 4-digit numbers.
So, there are totally 3700 + 280 = 3980 numbers.
Incorrect
Solution (a)
We need to consider all three digit and all 4-digit numbers.
Three-digit numbers: A B C. 5 can be printed in the 100’s place or 10’s place or units place.
=> 100’s place: 5 B C.
B can take values 0 to 9, C can take values 0 to 9. So, 5 gets printed in the 100’s place 100 times
=> 10’s place: A 5 C. A can take values 1 to 9, C can take values 0 to 9. So, 5 gets printed in the 10’s place 90 times
=> Unit’s place: A B 5. A can take values 1 to 9, B can take values 0 to 9. So, 5 gets printed in the unit’s place 90 times So, 5 gets printed 280 times in 3-digit numbers
Four-digit numbers: A B C D. 5 can be printed in the 1000’s place, 100’s place or 10’s place or units place.
=> 1000’s place: 5 B C D. B can take values 0 to 9, C can take values 0 to 9, D can take values 0 to 9. So, 5 get printed in the 100’s place 1000 times.
=> 100’s place: A 5 C D. A can take values 1 to 9, C & D can take values 0 to 9. So, 5 gets printed in the 100’s place 900 times.
=> 10’s place: A B 5 D. A can take values 1 to 9, B & D can take values 0 to 9. So, 5 gets printed in the 10’s place 900 times.
=> Unit’s place: A B C 5. A can take values 1 to 9, B & C can take values 0 to 9. So, 5 gets printed in the unit’s place 900 times.
5 get printed 3700 times in 4-digit numbers.
So, there are totally 3700 + 280 = 3980 numbers.