I GAVE MOCK TEST 2 AND I HAVE DOUBT IN QUESTION 18
Answer Explanation
A person starts typing the numbers from 1 to 1999. He press the keys total ānā number of times. The value of n is: Are you talking about this question ??? If yes then in this problem we have to find out the total number of times a key is hit to write all the numbers from 1 to 1999
These 1999 numbers can be grouped into 4 categories based on the number of digits A - 1 digit number number They are total 9 in number ( 1 to 9 ) B - 2 digit numbers They are in all 90 in number ( 10 - 99 ) C 3 digit numbers They are in all 900 in number ( 100 - 999) D - 4 digit numbers They are in all 1000 in number ( 1000 - 1999)
now if we want to type 1 digit number then we have to hit one key if we want to type a 2 digit number , then we have to hit two keys. if we want to type a 3 digit number , then we have to hity three keys if we want to type a 4 digit number then we have to hit four keys
Total number of times = 1 x 9 + 90 x 2 + 900 x 3 + 1000 x 4 = 9 + 180 + 2700 + 4000 = 6889