### Brain Teasers

# The Four-digit Number ABCD

There is a four-digit number ABCD, where A, B, C, D each represents a different digit from 1 to 9.

If ABCD is divisible by 13, BCDA is divisible by 11, CDAB is divisible by 9, and DABC is divisible by 7, what is the original number ABCD?

If ABCD is divisible by 13, BCDA is divisible by 11, CDAB is divisible by 9, and DABC is divisible by 7, what is the original number ABCD?

### Hint

Try to link the clues together.### Answer

If BCDA is divisible by 11, then so is ABCD, because both mean that A+C-B-D is divisible by 11.If CDAB is divisible by 9, then so is ABCD, because both mean that A+B+C+D is divisible by 9.

Therefore, ABCD is divisible by 13*11*9=1287, the only possibilities are 1287, 2574, 3861, 5148, 6435, 7722, 9009.

Among them, excluding the two with repeated digits, only 3861 satisfies the last clue - 1386 is divisible by 7.

Therefore, ABCD is 3861.

Hide Hint Show Hint Hide Answer Show Answer

## What Next?

View a Similar Brain Teaser...

If you become a registered user you can vote on this brain teaser, keep track of which ones you have seen, and even make your own.

### Solve a Puzzle

## Comments

This is a very clever problem which I couldnt solve. I was aware of all divisiblity rules (for 2,3,4,5,6,8,9 and 10) but not for 11. A friend of mine told me about the 11 divisibility rule, and the solution for this problem became clear. Thanks for an entertaining problem.

I used excel. There are different ways to tackle it, without specific math knowledge.

I used this Python code, which gives two answers, not just one:

---------------

for A in range(1,9):

for B in range(1,9):

for C in range(1,9):

for D in range(1,9):

ABCD = (A*10**3)+(B*10**2)+(C*10)+D

if (ABCD % 13)==0:

BCDA = (B*10**3)+(C*10**2)+(D*10)+A

if (BCDA % 11) == 0:

CDAB = (C*10**3)+(D*10**2)+(A*10)+B

if (CDAB % 9) == 0:

DABC = (D*10**3)+(A*10**2)+(B*10)+C

if (DABC % 7) == 0:

print('the number is: ',ABCD)

the number is: 3861

the number is: 7722

---------------

---------------

for A in range(1,9):

for B in range(1,9):

for C in range(1,9):

for D in range(1,9):

ABCD = (A*10**3)+(B*10**2)+(C*10)+D

if (ABCD % 13)==0:

BCDA = (B*10**3)+(C*10**2)+(D*10)+A

if (BCDA % 11) == 0:

CDAB = (C*10**3)+(D*10**2)+(A*10)+B

if (CDAB % 9) == 0:

DABC = (D*10**3)+(A*10**2)+(B*10)+C

if (DABC % 7) == 0:

print('the number is: ',ABCD)

the number is: 3861

the number is: 7722

---------------

To post a comment, please create an account and sign in.

## Follow Braingle!