Question 567696
<pre>
There are these 7 cases, where the letters X and Y represent 
numbers which are NOT 2's.  Remember there are 9 digits which are
not 2.

The cases are 2XY, X2Y, XY2, X22, 22X, 2X2, 222

Case 1: 2XY

There are 9 ways to choose a digit for the X and for each of 
those 9 ways there are 9 ways to choose a digit for the Y.

That's 9·9 or 81 ways


Case 2: X2Y

There are 8 ways to choose the X (it can't be 0 or 2) and for each 
of those 8 ways there are 9 ways to choose the Y.

That's 8·9 or 72 ways

Case 3: XY2

That's just like Case 2.  That's 72 more ways.

Case 4: X22

There are 8 ways to choose the X (it can't be 2 or 0).  That's 8 more ways.

Case 5: 22X

There are 9 ways to choose the X.  That's 9 more ways.

Case 6: 2X2

That's just like Case 5.  That's 9 more ways.

Case 7: 222.  That's 1 more way, simply the number 222.

81 + 72 + 72 + 8 + 9 + 9 + 1 = 252

Answer: 252

Edwin</pre>