# Difference between revisions of "2002 AIME II Problems/Problem 1"

## Problem

Given that

$\begin{eqnarray*}&(1)& \text{x and y are both integers between 100 and 999, inclusive;}\qquad \qquad \qquad \qquad \qquad \\  &(2)& \text{y is the number formed by reversing the digits of x; and}\\  &(3)& z=|x-y|. \end{eqnarray*}$ (Error compiling LaTeX. ! Missing \endgroup inserted.)

How many distinct values of $z$ are possible?

## Solution

We express the numbers as $x=100a+10b+c$ and $100c+10b+c$. From this, we have

$\begin{eqnarray*}z&=&|100a+10b+c-100c-10b-a|\\&=&|99a-99c|\\&=&99|a-c|\\ \end{eqnarray*}$ (Error compiling LaTeX. ! Missing \endgroup inserted.)

Because $a$ and $c$ are digits, and $a$ is between 1 and 9, there are 9 possible values.