We call a number peachy if every digit in the number is either a $3$ or next to a $3.$ For example, the numbers $333,$ $83,$ $303,$ and $3773$ are all peachy, but the numbers $32523,$ $786,$ $340,$ and $3999$ are not peachy. How many positive $2$-digit numbers are peachy?
First, solve these sub-problems:
1. How many peachy numbers start with 3? Call this number A.
2. How many peachy numbers end with 3? Call this number B.
3. How many peachy numbers start and end with 3? Call this number C.
Then, note that peachy numbers counted in 1 plus those counted in 2 cover all possiilities. However, some peachy numbers counted in 1 or 2 include those counted in 3. So we conclude that the answer should be A+B-C.
First, solve these sub-problems:
1. How many peachy numbers start with 3? Call this number A.
2. How many peachy numbers end with 3? Call this number B.
3. How many peachy numbers start and end with 3? Call this number C.
Then, note that peachy numbers counted in 1 plus those counted in 2 cover all possiilities. However, some peachy numbers counted in 1 or 2 include those counted in 3. So we conclude that the answer should be A+B-C.