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

By Piyush Nimavat · Mar 18, 2020 ·UPSC
Raja Gopal answered Jan 17, 2020
By writing a Python Program or C Program
You can get the answer in short time .

Manju Sood answered 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 answered May 18, 2020
How u think the answer is c

Bharath Reddy Gundala answered 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 answered May 29, 2020
1010 time 5 will come

Telang Ankush answered May 24, 2020
271

Varsha Kundu answered 4 days ago
C 271

Don't know

Ravikant Vishwakarma answered May 17, 2020
300

Nilam Bharti answered Aug 16, 2020
Ans c is correct

Rachit Jaiswal answered 3 weeks ago
5 will appear 300 times.

Parimi Gayathri answered 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 answered Mar 18, 2020

Anita Nahak answered Apr 10, 2020
C

Lavenya Rathakrishnan answered May 21, 2020
Option b 300 is the correct answer

Hemanth Potnuru answered 2 days ago
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

Prabesh Bhattarai answered Apr 26, 2020
269

Ram Kumar answered Apr 27, 2020
A

Bidyapati Biswaranjan Sa answered 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.

Krishnendu S Nair answered Mar 16, 2020
How can the answer be 271 ...it's 300.
I am not able to get 271 as it's answer....

Ajay Kumar Nirala answered May 07, 2020
B300

Vikash Anand answered 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

Munishwari Sudha answered Jul 25, 2020
Plz correct the answer and is 300

It's a 300 ,, if it's 271 can u explain

Renu Xavier answered 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

Vivek Gupta answered Jun 19, 2020
Correct ans is 300

Vinod Patil answered 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}

Tabish Aligarian answered Apr 16, 2020
Kyse aaya

Varshini Anun answered Apr 30, 2020