Each of the digits 0 through 9 is used exactly once to create a ten-digit integer. Find the greatest ten-digit number which uses each digit once and is divisible by 8, 9, 10, and 11.


1 Answer 1


For a multiple of 10

The number must end with a 0. So put it at the end.

For a multiple of 9

The sum of digits must be a multiple of 9. This is the case when using all digits 0 to 9. So you don't need to worry about that.

For a multiple of 8

The last 3 digits must form a multiple of 8. Since the last digit is 0, the 2 digits before the 0 must be a multilpe of 4.

For a multiple of 11

The sum of digits at odd positions minus the sum of digits at even positions must be a multiple of 11. This requires some calculations.
Starting from 9876543210, the odd digits are 9,7,5,3,1 with sum 25. The even digits are 8,6,4,2,0, summing to 20.
To get a multiple of 11, you can swap some digits to transfer 3 units to the odd digits. This gives 25+3 = 28 for the odds, 20-3 = 17 for the evens, and 28-17 = 11.
The simplest swap (affecting the smallest digits) seems to be to swap the 1 and the 4.

This results in the number 9876513240. Luckily, 240 is a multiple of 8. (or 24 is a multiple of 4).

So the number is


One can verify easily that is is a multiple of 8, 9, 10 and 11.
It is even a multiple of all integers from 3 to 12, except 7.


Note that swapping 1 and 4 is only an educated guess. To prove that this choice is optimal note that any permutation that affects larger digits than 4 results in a smaller number. So you only need to try permutations of digits 1,2,3,4 to see there is no better way to fix the multiple of 11.
Being a multiple of 8 means the number must terminate with 120, 320 or 240. This reduces the number candidates from 24 to 6.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.