ABC-CBA =(a-c)* 100+(c-a)= 99 *(a-c)
Because ac is all numbers less than 10, and a-c is also less than 10, so a-c=n, and the difference between those two numbers is 99n =100N-n.
As can be seen from the above formula, the difference between hundreds is (n- 1) and the difference between single digits is (10-n), so the number of decimal places is:100n-[100 * (n-1)+.
Then the difference is expressed in numbers: (n- 1)9( 10-n), and each number represents a number.
The exchanged number is (10-n)9(n- 1), and the sum of the two numbers is:100 (n-1)+90+1n+/kloc-0.
Demonstration