Courses

# 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? Related Test: UPSC Prelims Past Year Paper 2019: Paper 2 (CSAT)

## UPSC Question Raja Gopal Jan 17, 2020
By writing a Python Program or C Program
You can get the answer in short time . Manju Sood Mar 19, 2020
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. Jhansi Sweety May 18, 2020
How u think the answer is c Bharath Reddy Gundala May 21, 2020
B) 300
Any number between 1 and 999 can be expressed in the form of xyz where 0 < x,y,z="" /> 9

Case 1. The numbers in which 5 occurs only once. This means that 5 is one of the digits and the remaining two digits will be any of the other 9 digits

You have 1*9*9 = 81 such numbers. However, 5 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 5 will appear only once.

Case 2. The numbers in which 5 will appear twice. In these numbers, one of the digits is not 5 and it can be any of the 9 digits.
There will be 9 such numbers. However, this digit which is not 5 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 5 is written twice. Therefore, 5 is written 27*2= 54 times.

Case 3. The number in which 5 appears thrice - 555 - 1 number. 5 is written thrice in it.

Therefore, the total number of times the digit 5 is written between 1 and 999 is 243 + 54 + 3 = 300 Nivedita Singh May 29, 2020
1010 time 5 will come Varsha Kundu Sep 27, 2020
C 271 Telang Ankush May 24, 2020
271 Let's Read Botany May 06, 2020
Don't know Ravikant Vishwakarma May 17, 2020
300 Balwant Singh Mar 20, 2021
From 1 to 999, we can have a max 3 digit number.
_ _ _
each place can have a digit 5. there are 3 ways possible here
1. one out of three digits is 5 =>
here other two digits may have value 0 to 9 except 5 => 3C1 *  9 * 9 = 3 * 81 =  243
2. two out of three digits is 5 =>     3C2 * 9 = 3 * 9 = 27
3. 3 out of 3 digits is 5 =>  3C3 = 1

total = 243+27+1 = 271 Brain Games 3 weeks ago
HOW MANY 5 COMES BETWEEN 1 TO 100 = 20 TIMES
NOW 20*10= 200
IN BETWEEN 500TO599=100 COUNTING ON 100th place Nilam Bharti Aug 16, 2020
Ans c is correct Rachit Jaiswal Sep 14, 2020
5 will appear 300 times. Parimi Gayathri May 03, 2020
From 1 to 100
5,15,25,35,45,55,65,75,85,95 Among these ten 5's are in units place
50,51,52,53,54,55,56,57,58,59 Among these ten 5's are in tens place
so ten 5's in units place + ten 5's in tens place = 20 times
=> from 1 to 1000 the number of times the digit 5 appears =
20 * 10 = 200 times
=> from 500 to 600 the number of times the digit 5 appears= 100 times
then total number of times 5 appears from 1 to 1000=
200+ 100 = 300 times
Hence 300 is the right answer Ankit Mathur Mar 18, 2020 Lavenya Rathakrishnan May 21, 2020
Option b 300 is the correct answer Bidyapati Biswaranjan Sa Jul 15, 2020
5 will come 100 times in ones place (1-1000).
5 will come 100 times in tens place (1-1000).
5 will come 100 times in hundreds place (1-1000).
So in total 5 will come 300(100+100+100) times from 1 to 1000. So I think 300 is the right answer. Anita Nahak Apr 10, 2020
C Hemanth Potnuru Sep 29, 2020
1-99, 5 appears =20 times
so 20×9=180 for 1-499 and 600-1000
and from 500 to 599 5 appears 120 times Sakthivel.e 8 B Nov 12, 2020
200 Iram Naaz Naaz Feb 12, 2021
B Prabesh Bhattarai Apr 26, 2020
269 Ram Kumar Apr 27, 2020
A Surendra Sowdanoor Jan 19, 2021
Number 5 comes 20 times in 0-100, 101-200, 201-300, 301-400, 401-499, 600-700, 701-800, 801-900, and 901-1000,
Hence 9 x 20 = 180, And between 500 to 599  it comes 120 times so total 180+120 = 300 So the Answer for this is Option B  300 Vikash Anand Jul 03, 2020
in 1-100 (1-49 -- 5-5s exist,51-59-- 11-5s,60-100--4-5s)
total=11+5+4=20
so,there are 10 such groups,1-100,101-200,201-300-901-1000,
so we will do -- 20*10=200,
but in 500-599-there is additional 100- 5s in 100th place ,
simple Ajay Kumar Nirala May 07, 2020
B300 Krishnendu S Nair Mar 16, 2020
How can the answer be 271 ...it's 300.
I am not able to get 271 as it's answer.... Munishwari Sudha Jul 25, 2020
Plz correct the answer and is 300 Renu Xavier Jul 16, 2020
No of 5s in the ones place: 100 ;

No of 5s in the tens place: 100 ;

No of 5s in the hundreds place: 100 ;

Total 300 It's a 300 ,, if it's 271 can u explain Vivek Gupta Jun 19, 2020
Correct ans is 300 Vinod Patil Apr 25, 2020
(i:.e; 1-100 normally counts 5,15,25...95 =10
50=1
51,52,53...59=9
So Total 20)

105 to 195= Counts again 20
205 to 295= Counts again 20
305 to 395= Counts again 20
But 405 to 500 = Counts 21 (because last number 500 will be added)
So total 1 to 500= Counts 20+20+20+20+21=101

[ Next, 501 to 510 here remember 505 =Total Counts 11
up to 550 =11*5=55+1 =56 (+1 to include 550)
551 to 560 = Counts 20
561 to 599 = Counts 44
Total 56+20+44= 120 ]

remaining 605 to 695 (same counts as 1 to 100) 20
705 to 795 = 20
805 to 895 = 20
905 to 995 = 20
So total 20+20+20+20= 80

1 to 1000
{Number 5 counts 101+120+80= 301 times} Varshini Anun Apr 30, 2020  