## 35 Only Once

How many four digit numbers contain the digit pattern 35 at least once and only once?
Source: mathcontest.olemiss.edu 9/12/2011

SOLUTION
This problem is similar to the problem titled “Eighty-Five Four Digits” dated 11/12/2007.
Case 1: 35XY
X: ten choices from 0 through 9
Y: ten choices from 0 through 9
Total choices = $10\times 10-1=99$ we subtract 1 because 3535 is not allowed.

Case 2: X35Y
X: nine choices from 1 through 9
Y: ten choices from 0 through 9
Total choices = $9\times 10=90$

Case 3: XY35
X: nine choices from 1 through 9
Y: ten choices from 0 through 9
Total choices = $9\times 10-1=89$ we subtract 1 because 3535 is not allowed.

Grand total = $99+90+89=278$.