UPSC PYQPrelims 2019

Civil Services Examination · Question 9

The number of times the digit 5 will appear while writing the integers from 1 to 1000 is

  1. 269

  2. 271

  3. 300

  4. 302

Show answer & explanationShow explanation

Answer: (C) 300

Explanation

Concept: Pad numbers from 000 to 999 as 3-digit strings (1000 numbers in total; 1000 itself has no 5 and 000 has no 5). Count by Place: ⇒ Units place (_ _ 5): The first two digits can be chosen in 10 × 10 = 100 ways → 100 times. ⇒ Tens place (_ 5 _): The other two digits can be chosen in 10 × 10 = 100 ways → 100 times. ⇒ Hundreds place (5 _ _): The last two digits can be chosen in 10 × 10 = 100 ways → 100 times. Result: Total appearances of digit 5 = 100 + 100 + 100 = 300. Shortcut: From 1 to 10ⁿ, any digit from 2 to 9 appears n × 10ⁿ⁻¹ times ⇒ 3 × 10² = 300. Correct Answer: (c) 300

Diagram explaining the answer