# How many number of three digit numbers lying between 100 and 999 (inclusive) and having only two consecutive digits identical?

Please suggest a suitable approach for this problem.

-
This is just counting isn't it? What's your motivation for this? –  Rasmus Sep 24 '10 at 11:56
This seems a bit like homework so here's just a hint: count the number that contain 00, 11, 22, ..., 99 (but not 111, 222, ...). –  Derek Jennings Sep 24 '10 at 11:59
Derek this is not a really a homework,the solution given is like this :9*9 + 1*9 + 8*9 = 162. But I am unable to figure out a proper explanation :| –  Quixotic Sep 24 '10 at 12:02
It helps to say something about the motivation behind the question, even if it is just homework, and also a little on what you've tried so far. –  Derek Jennings Sep 24 '10 at 12:03
Motivation is that it comes from my test paper.As the matter of fact I can only brute-force using computer programming to reach that answer,but I need some concrete idea to solve this problem logically. –  Quixotic Sep 24 '10 at 12:09

Ok. Ask yourself first how many contain 00. Next, how many contain 11 (it's 17, you work it out). Then consider the number that contain 22, etc. You will get 9+17*9=162. I hope this helps.

-
I understood your approach, which is like this :Number of numbers of the form 00 = 9, number of number of the form 11 = 9 and of the form *11 = 8 (we can't use 0 and 1 ) Thus we get 17 for 11 we will get 17 for each of 22,33,44,55,55,77,88,99.Hence the required answer is : 9+17*9 = 162. –  Quixotic Sep 27 '10 at 9:26