t's actually pretty easy. When you take a number, jumble around it's digits and then subract the new number from the old, you are always going to get the sum of the digits of the difference is divisible by 9 (ignoring any negative).
Example: 12345-54321 =-41976 ----> 4+1+9+7+6= 27=9•3
When you give all but one of the digits (and knowing that the last one is not 0), the computer just takes the sum of the digits you gave it, and subtracts it from a multiple of 9 (so that the remainder is between 1 and 9).
Let's take 1234 and 4321 for example:
1234-4321=-3087
Now choose a non-zero number:
if the number was 3 then the sum of the rest would be 15, and 18-15=3
If the number was 8, then the sum of the rest would be 10 and 18-10=8
If the number was 7, then the sum of the rest would be 11 and 18-11=7
(now, the number you subract rom will not always be 18, but it will always be a multiple of 9)
The number that you picked will always be the remainder.
Why can't you pick 0?
Lets look at this example:
Choosing 0, we have the sum or the remaineder is 3+8+7=18. Therefore, the computer doesn't know if it should subtract 18 from 18, and the number you picked was 0, or subract 18 from 27 and the number you picked was 9.
2006-06-22 15:25:33
·
answer #1
·
answered by Eulercrosser 4
·
2⤊
0⤋