The number of times the digit 5 will appear while writing the integers from 1 to 1000 is
a)269
b)300
c)271
d)302
Correct answer is option 'C'. Can you explain this answer?

UPSC Question

By Piyush Nimavat · 3 weeks ago ·UPSC
4 Answers
Raja Gopal answered Jan 17, 2020
By writing a Python Program or C Program
You can get the answer in short time .

Ankit Mathur answered 3 weeks ago
Using binomial get answer b

Manju Sood answered 2 weeks ago
From 1 to 1000, the numbers in which 5 can occur could be of one digit, two digits or three digits.
Case I – If the number is of one digit – 5 will appear only one time, i.e. in 5.
Case II – If the number is of two digits – then
(a) There is only one 5, this can happen in two ways _5 and 5_. In the first case (_5) the blank Place can be filled in 8 ways(as 0 and 5 cannot appear at that place), while in the second case (5_) the blank place can be filled in 9 ways (5 cannot appear there). Total 9 + 8 = 17 ways.
(b) There are two 5s. In this case only ONE possibility.
Case III – If the number is of three digits – then
(a) Only one 5. Then, 5 can occupy three positions. 5 _ _ or _ 5 _ or _ _ 5. In the first case (5_ _), remaining two positions can be filled in 9 way each. So total 9 × 9 = 81 possibilities. In the second case (_ 5 _) first position can be filled in 8 ways and last position can be filled in 9 ways. So total 9 × 8 = 72 possibilities. Same will be true for the third (_ _ 5) case. So total 72 possibilities.
(b) Only two 5. This can be done in three ways 55_ or 5_5 or _55. In first (55_) and second (5_5) case it can be filled in 9 ways each. While in the third case (_55) it can be filled in 8 ways. So total 9 + 9 + 8 = 26 possibilities.
(c) All three digits are 5. This can be done in only ONE way. i.e, 555.
So, total = 1 + 17 + 1 + 81 + 72 + 72 + 26 + 1 = 271.

Krishnendu S Nair answered 3 weeks ago
How can the answer be 271 ...it's 300.
I am not able to get 271 as it's answer....

This discussion on The number of times the digit 5 will appear while writing the integers from 1 to 1000 isa)269b)300c)271d)302Correct answer is option 'C'. Can you explain this answer? is done on EduRev Study Group by UPSC Students. The Questions and Answers of The number of times the digit 5 will appear while writing the integers from 1 to 1000 isa)269b)300c)271d)302Correct answer is option 'C'. Can you explain this answer? are solved by group of students and teacher of UPSC, which is also the largest student community of UPSC. If the answer is not available please wait for a while and a community member will probably answer this soon. You can study other questions, MCQs, videos and tests for UPSC on EduRev and even discuss your questions like The number of times the digit 5 will appear while writing the integers from 1 to 1000 isa)269b)300c)271d)302Correct answer is option 'C'. Can you explain this answer? over here on EduRev! Apart from being the largest UPSC community, EduRev has the largest solved Question bank for UPSC.