Chad W. answered 05/31/16
Tutor
4.9
(164)
Experienced and Professional Tutor on a Bicycle
Well, we need "the following" options to answer completely, but we might be able to say a few things.
Let's look at some examples.
101 - 101 = 0
201 - 102 = 99
251 - 152 = 99
271 - 172 = 99
301 - 103 = 198
302 - 203 = 99
401 - 104 = 297
402 - 204 = 198
403 - 304 = 99
100 - 1 = 99
520 - 25 = 495
Some patterns are emerging. First, it seems the middle digit doesn't matter. Secondly it seems only a handful of differences are possible. I should mention these could have all gone negative as well.
The possibilities are:
-891 891
-792 792
-693 693
-594 594
-495 495
-396 396
-297 297
-198 198
-99 99
-693 693
-594 594
-495 495
-396 396
-297 297
-198 198
-99 99
0
We could try showing this.
A given number could be represented by its digits: x, y, and z (each between 0 and 9 inclusive). So, the values are
number1 = 100*x+10*y+z
number2 = 100*z+10*y+x
Let's consider the difference.
diff = number2-number1 = 100*z+10*y+x - (100*x+10*y+z)
Simplify.
diff = 99z - 99x = 99*(z-x)
And x and z are both integers between 0 and 9. So the difference between z and x (reprezented by (z-x)) is an integer between -9 and 9. So, we just need to enumerate 99*{-9,-8,...8,9}.