The Egyptian Pharaoh

Logic Level 2

A B C D E × 4 E D C B A \begin{array} { l l l l l l } & & A & B & C & D & E \\ \times & & & & & & 4 \\ \hline & & E & D & C & B & A \\ \end{array}

Once there was a pharaoh who had a dream. He wanted someone to interpret it. All failed to do it. Could you interpret it correctly?

The pharaoh, in his dream, saw the above multiplication.

Could you figure it out and tell us what the five digit number A B C D E \overline{ABCDE} is?


The answer is 21978.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

12 solutions

Chew-Seong Cheong
Apr 25, 2015

A B C D E × 4 E D C B A \begin{array}{c}& A & B & C & D & E \\ \times & & & & & 4 \\ \hline & E & D & C & B & A \end{array}

  1. Find A : Let us start with A A of A B C D E \overline{ABCDE} . Since A × 4 = E < 10 A\times 4 = E < 10 , A A has to be either 1 1 or 2 2 . We note that the product E D C B A \overline{EDCBA} ends with A A . Since a multiple of 4 4 must be even A 1 A \ne 1 and must be A = 2 \boxed{A=2} .
  2. Find E : Now we note that E E in the product can either be 8 8 or 9 9 . If E = 9 E=9 , then E × 4 = 36 E\times 4 = 36 , and A A in the product would be 6 6 , which is incorrect. Therefore, E = 8 \boxed{E=8} , then 8 × 4 = 32 8 \times 4 = 32 .
  3. Find B : From A B × 4 = E D c 3 \overline{AB} \times 4 = \overline{ED} - c_3 , where c 3 = 0 , 1 , 2 , 3 c_3 = 0,1,2,3 is the carried-forward, we note that B × 4 < 10 B \times 4 < 10 , else E = 9 E = 9 , which is unacceptable. Therefore, B = 1 B = 1 or 2 2 . From D × 4 + c 1 = 10 c 2 + B D \times 4 + c_1 = 10c_2 + B , we note that B B is odd, because 4 D 4D is even and c 1 = 3 c_1 = 3 , which is odd. Therefore, B = 1 \boxed{B=1} .
  4. Find D : Therefore, 4 D + 3 = 10 c 2 + B = 10 c 2 + 1 4D+3 = 10c_2 + B = 10c_2 + 1 . This means that 4 D = 8 4D = 8 or 28 28 or D = 2 D = 2 or 7 7 , but D A = 2 D \ne A = 2 , hence D = 7 \boxed{D = 7} .
  5. Find C : Now 4 ( 10 B + C ) + c 2 = 4 C + 43 = 10 D + C = 70 + C 4(10B+C) + c_2 = 4C + 43 = 10D+C = 70+C , then we have 3 C = 27 C = 9 3C = 27\quad \Rightarrow \boxed{C=9} .

Therefore, A B C D E = 21978 \overline{ABCDE} = \boxed{21978}

Moderator note:

Fantastic! Fun fact: 2178 × 4 = 8712 2178 \times 4 = 8712 .

Can you generalize this? That is for positive integer n 5 n \geq 5 , find an n n -digit positive integer such that when it is multiplied by 4 4 , the resultant number is the reversal of digits of the original number.

Reply at the Master Note.

Given n 5 n \geq 5 call m = n 4 m = n - 4 .

Then the number

21 99 99 m - t i m e s 78 \displaystyle 21\underbrace{99\cdots99}_{ m \text-{times}}78

should work.

Andrea Palma - 6 years ago

When you are finding A 0 should also be a possible number that you could think of (as well as 1 and 2). So E would have to be 5 (or 0 because the question does not clearly state that each letter is a different number). However this means that B 4+first digit of what c 4 provides us with would have to be ≥50 and this is not possible. So A=2.

I haven't actually tried weather there or other results if you don't follow the ruel that no number can be used twice.

Elias Klossok - 4 years, 9 months ago

Log in to reply

In cryptograms, it is implied that any leading digit must be non-zero. Generally they mention if no number can be used twice, but if not it's safer to assume they can't. However, for this particular problem, the only solution has distinct digits.

Alex Li - 4 years, 5 months ago

Under the given set of rules the easiest answer is actually 00000 but it is not accepted as an answer.

Owen Rathernotsay - 4 years, 12 months ago

Log in to reply

That is why 0 is frequently known as a trivial solution. It is strictly not a five-digit number.

Chew-Seong Cheong - 4 years, 12 months ago
Mehul Arora
Apr 25, 2015

Given: ABCDE x 4 = EDCBA

The answer is: 21978 x 4 = 87912

But rather than just give you the answer, here's how I figured it out. First, it is obvious that A must be an even number, because we are multiplying by 4 (an even number). The last digit will therefore be even. It can't be 0, because that would make ABCDE a four-digit number. It can't be more than 2, because that would result in a six-digit answer. So A = 2.

2BCDE x 4 = EDCB2

So what can E be? The choices are E = {3, 8} because 3 x 4 = 12 and 8 x 4 = 32. But a value of 3 doesn't work in the result (3????) because it is too small.

2BCD8 x 4 = 8DCB2

Since the final number is 8 and we have 2 x 4, that means there is no carry from the prior multiplication (4 x B + carry). So B can't be anything higher than 1, possibly 0.

Looking at the other side of the equation, we have 4D + 3 = (a number ending in 0 or 1). In other words, 4D must end in 7 or 8. Obviously only 8 works, because 4 is an even number. Working forward again, that means B = 1.

21CD8 x 4 = 8DC12

So what values of 4D result in a number ending 8? 4 x 2 = 8, 4 x 7 = 28. Now 2 is already taken and the problem said the digits were unique. So D = 7.

21C78 x 4 = 87C12

Finally, we have a carry of 3 (from 28 + 3 = 31). And when we calculate 4C + 3 it must also result in a carry of 3 and a last digit of C. In other words: 4C + 3 = 30 + C

This is easy to solve: 3C = 27 C = 9

Thus the final answer is: 21978 x 4 = 87912

Moderator note:

This solution is incomplete.

"So B can't be anything higher than 1, possibly 0." Why can't B equals to 2?

You could phrase your working for B better: With 4 D + 3 B m o d 10 4D + 3 \equiv B \bmod {10} . With possible values of B B as 0 , 1 , 2 0,1,2 only shows that B = 1 B=1 .

"and the problem said the digits were unique", there's no indication that all digits A , B , C , D , E A,B,C,D,E are distinct.

This solution is belong to Soumek Mishra

Hafizh Ahsan Permana - 6 years, 1 month ago

Will some one pl tell me which app to use to type the answers like this

T Anil Gangadharan - 4 years, 12 months ago

Well let me throw some light in this solution.B can be 1 or 2. Now 4.8=32 with carry of 3. Now 4.(D)+3=an odd number.So B cannot be 2 as any number ending with 2 or 2 itself is an even number.Hence B is 1.

DEBABRATA MUKHERJEE - 4 years, 11 months ago

That's how cryptarithms are, is with distinct digits. That's just a given. But if it's not a given here, then the answer is that D must be odd, since we are carrying a 3 into the tens' column.

Whitney Clark - 4 years, 1 month ago

A must be less than 10 so that the number stays 5 digit. There can be two values for A, 1 and 2. But since the number is multiplied by 4 it is even. So A is 2.

E can be 8 or 9. E x 4 should have 2 in ones digit. 9 x 4 is 36, 8 x 4 is 32. E now is 8.

Next, B can be 0,1,2. D x 4 + 3 gives an odd number. So B is equal to 1.

D can be 2 or 7. Since 2 x 4 + 3 is 11 and 7 x 4 + 3 is 31 which both result to 1 in the ones digit. But B x 4 ranges from 4 to 9 so we cant have 2 for D. Therefore D is 7.

C x 4 + 3 should be 30 to 39 so that B x 4 + 3 = 7 = D. C now is from 7 to 9. 7 x 4 + 3 is 31, 8 x 4 + 3 is 35, 9 x 4 + 3 is 39. C x 4 + 3 should have C in its ones digit. So C now is 9.

The number is 21978..

Moderator note:

Great. Simple and straight to the point.

Okay, so we have A B C D E 4 = E D C B A \overline{ABCDE}*4 = \overline{EDCBA} .

Since E D C B A \overline{EDCBA} is a multiple of 4 4 , it is an even number, and thus A A must be even. Furthermore, since E D C B A \overline{EDCBA} has 5 5 digits, A B C D E \overline{ABCDE} can be at most 24999 24999 , for 25000 4 = 100000 25000*4 = 100000 .

Thus, A A is either 0 0 or 2 2 .

Suppose that A = 0 A = 0 ; this gives us E = 0 E = 0 or E = 5 E = 5 , since the only digits that multiplied by 4 4 ends in 0 0 are 0 0 and 5 5 . Suppose that E = 0 E = 0 ; then, B C D 0 4 = D C B 0 \overline{BCD0}*4 = \overline{DCB0} . Then, since the greatest value for D C B 0 \overline{DCB0} is 9990, we have that B C D 0 2495 \overline{BCD0} \leq 2495 ; thus, B 2 B \leq 2 . If B = 0 B = 0 , then: C D 0 4 = D C 00 \overline{CD0}*4 = \overline{DC00} . Since C D 0 \overline{CD0} is at most 990 990 , then D C 00 3960 \overline{DC00} \leq 3960 , and so D 3 D \leq 3 . However, since D 0 4 D0*4 must end in 00 00 , then D = 0 D = 0 , which gives us C 00 4 = C 00 \overline{C00}*4 = \overline{C00} , which implies that C C must be 0 0 as well - and we have a solution, " 00000 " "00000" which I don't think that counts... Let's keep going.

If B = 1 B = 1 , we'd have: 1 C D 0 4 = D C 10 \overline{1CD0}*4 = \overline{DC10} , which doesn't work because the last two digits of all multiples of four must form a number divisible by 4 4 - and 10 10 isn't.

If B = 2 B = 2 , then: 2 C D 0 4 = D C 20 \overline{2CD0}*4 = \overline{DC20} . Now, we must have D = 3 D = 3 or D = 8 D = 8 , since these are the only digits that when multiplied by 4 4 yield a last digit of 2 2 . However, since B = 2 B = 2 , then D = 8 D = 8 , for all numbers between 2000 2000 and 2499 2499 , when multiplied by 4 4 , begin either with 8 8 or 9 9 .

Then, we have: 2 C 80 4 = 8 C 20 \overline{2C80}*4 = \overline{8C20} . From previous calculations, we've established that C 4 C \leq 4 . Let's test this:

2080 4 = 8320 8020 2080*4 = 8320 \neq 8020

2180 4 = 8720 8120 2180*4 = 8720 \neq 8120

2280 4 = 9120 8220 2280*4 = 9120 \neq 8220

2380 4 = 9520 8320 2380*4 = 9520 \neq 8320

2480 4 = 9920 8420 2480*4 = 9920 \neq 8420

Thus, this condition does not yield a solution. Let's turn to the other case, where E = 5 E = 5 .

We can write: B C D 5 4 = 5 D C B 0 \overline{BCD5}*4 = \overline{5DCB0} . However, the smallest 5 5 -digit number, 50000 50000 , when divided by four, is 12500 12500 , which is still a 5 5 -digit number. Thus, we must have A = 2 A = 2 .

If A = 2 A = 2 , then we must have either E = 3 E = 3 or E = 8 E = 8 in order for the last digit of E B C D A \overline{EBCDA} being equal to 2 2 , since these are the only digits that when multiplied by 4 4 give us a last digit of 2 2 . However, since we have A = 2 A = 2 , then E E must be equal to 8 8 , for any number between 20000 20000 and 24999 24999 when multiplied by 4 4 begins with either 8 8 or 9 9 ; we now have: 2 B C D 8 4 = 8 D C B 2 \overline{2BCD8}*4 = \overline{8DCB2} .

The greatest number of the form 8 D C B 2 \overline{8DCB2} is 89992 89992 , that when divided by four yields 22498 22498 . This limits the value for B B : B 2 B \leq 2 . Now, if B = 0 B = 0 , then 8 D C 02 \overline{8DC02} can never be divisible by 4 4 since all multiples of 4 4 have the number formed by their last two digits also divisible by 4 4 . This also occurs if B = 2 B = 2 , but not if B = 1 B = 1 , though - 22 22 is not divisible by 4 4 , but 12 12 is indeed a multiple of 4 4 , so it's valid to assume that B = 1 B = 1 .

Now, we have: 21 C D 8 4 = 8 D C 12 \overline{21CD8}*4 = \overline{8DC12} . The greatest number that theoretically could be formed is 21998 21998 ; when multiplied by 4 4 , it yields 87992 87992 .

Now, from the previous calculation, we've established that D D is at most 7 7 , Thus, we can write 0 D 7 0 \leq D \leq 7 . D D cannot be 0 0 , since if it were, then the last digits of E B C D A \overline{EBCDA} would equal 32 32 and not 12 12 .

If D = 1 D = 1 , then the last digits of E B C D A \overline{EBCDA} would be 72 72 ; if D = 2 D = 2 , then the last digits of E B C D A \overline{EBCDA} would be equal to 12 12 and match. We'd then have: A B C D E = 21 C 28 \overline{ABCDE} = \overline{21C28} ; however, 21000 4 = 84000 21000*4 = 84000 , and so there is no matching C C that can overcome the fact that this number, when multiplied by 4 4 , would be greater than a number of the type 82 C 12 \overline{82C12} .

Moving on, if D = 3 D = 3 , then the last digits of E B C D A \overline{EBCDA} would be 52 52 ; if D = 4 D = 4 , then these would be 92 92 ; if D = 5 D = 5 , they'd be equal to 32 32 ; if D = 6 D = 6 , they'd be equal to 72 72 .

If D = 7 D = 7 , however, then the last digits are 12 12 . Then, we have: A B C D E = 21 C 78 \overline{ABCDE} = \overline{21C78}

When multiplying this number by 4 4 , we must again note that 21000 4 = 84000 21000*4 = 84000 , which implies that C C must provide a carry value of 3 3 on the thousand's place in order for the multiplication to hold. Thus, C = 8 C = 8 or C = 9 C = 9 ; if C = 8 C = 8 is taken, it yields 21878 4 = 87512 87812 21878*4 = 87512 \neq 87812 . We're left with C = 9 C = 9 , and it does hold that 21978 4 = 87912 21978*4 = 87912 . Therefore, A B C D E = 21978 \overline{ABCDE} = 21978 , and it's the only solution possible.

Luis Rivera
Jun 5, 2016

I discovered a secret, a most marvelous shortcut in which I can determine BA + 9 = AB. But I shall not share it​

Lu Chee Ket
Nov 2, 2015

40000 A + 4000 B + 400 C + 40 D + 4 E = 10000 E + 1000 D + 100 C + 10 B + A

=> 39999 A + 3990 B + 300 C = 9996 E + 960 D {Better because simplified.}

We know A has to be smallest i.e. 1 or 2. However, with thorough scientific method:

FOR A:=1 TO 9 DO

FOR B:=1 TO 9 DO

FOR C:=1 TO 9 DO

FOR D:=1 TO 9 DO

FOR E:=1 TO 9 DO

Only A B C D E = 21978 is found. Checked 87912 to be correct.

Answer: 21978

Ken Jan
Apr 24, 2015

Moderator note:

This solution is incomplete. You did not explain your motivation for assuming E = 8 E=8 nor did you prove that your solution is unique.

Exactly!

How do we know which value will satisfy the equation? There can be so many combinations? Isn't it?

Ashish Garg - 6 years, 1 month ago

I used simple code to solve this; sorry for being so awkward because this is so in the future: Don't mind the 73027 on the top line; that was from a previous output.

Adarsh Mahor
Jan 13, 2017

It's easy the only main thing is to see A should be less than 3 so, it can be 2 or 1 so, Put u r imagination on...!

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
def revDigits(n):
    ans = 0
    while n:
        ans = ans*10 + n%10
        n /= 10
    return ans

for i in range(10000, 99999):
    if revDigits(i)==4*i:
        print i

Python

Harsh Bhardwaj
Apr 25, 2015

A bit of programming :P

wrong approach

Anishchandran C - 6 years, 1 month ago

Log in to reply

LOL haha :P

JohnDonnie Celestre - 6 years, 1 month ago

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...