# Crack the 5 digits code

I created this "crack the code" puzzle.
I hope the members here like it. • Are A, B, C, D, E different? – Wen1now Jun 29 '17 at 4:57
• – Weijun Zhou Jan 27 '18 at 7:20

## 2 Answers

Call the three clues 1, 2, 3. Looking at 1 and 3, we can deduce that

1 and 3 are not in the code

Therefore two of

5, 7, 9

are in the number. But it can't be

7 and 9 so 5 must be the first digit.

Looking at 2 we deduce that

9 cannot be correct otherwise it contradicts 3

Hence

7 is correct so the first two digits are 5 7

Therefore looking at 1,

1, 3, 4, 9 are not in the number

Thus the second last digit must be a

2

since A+B+C+D+E=10D+E.

Now the third digit must therefore be a

4 or 6

and the sum of the first four digits must be

20

Therefore we must have

5762?

where

0 or 8 as the question mark are perfectly valid.

• Final step; the equation is false if D is the first of your options, so you should be able to exclude that option if I'm not completely mistaken. – Jakob Pamp Bengtsson Jun 29 '17 at 10:22
• @JakobPampBengtsson Wait, what? – Wen1now Jun 29 '17 at 10:34

Call the three clues 1, 2, 3. Looking at clue 1 and 3, we can deduce that

1 and 3 are not in the code

Based off knowing that the equation will determine the last 2 digits and referencing clue 3

9 cannot be in the code

Now you know that

1, 3, 9 are not in the code, you are left with 4 and 7 as possibilities to be your digit for clue 1.

This further concludes that

5 and 7 are your first two digits as you have eliminated the other digits from clue 3. This also eliminates 4 from clue 1 as it states that ONLY one digit from that set is correct.

Looking at rule 2, we know that

3, 4 and 9 are not in the code and we have solved that 5 is the first digit which leaves 6 to be true for the only digit in the right position.

Now, by looking at the equation (A+B+C+D+E=D*10+E)

We can solve for D by using basic algebraic calculations:
5 + 7 + 6 + D + E = D*10 + E
18 + D + E − 10D = 10D + E − 10E
18 − 9D + E = E
18 − 9D + E − E = E − E
18 − 9D = 0
18 − 9D − 18 = 0 − 18
−9D = −18
−9D / −9 = −18 / −9
D=2

To solve for the last digit,

E, use the same method we used to solve for D:
5 + 7 + 6 + D + E = D*10 + E
18 + D + E − E = 10D + E − E
18 + D = 10D
18 + D − D = 10D − D
18 = 9D
18 − 18 = 9D − 18
0 = 9D − 18
0 / 0 = (9D − 18) / 0
E = (9D − 18) / 0
IF D = 2 THAN, E = (9 * 2 – 18) / 0
E is confirmed as 0

To confirm the equation, plug in your results

5 + 7 + 6 + 2 + 0 = 2 * 10 + 0
20 = 20

Code

57620

• This is basically cut and paste of Wen1now’s answer with a final assertion that is not explained at all. How did you determine the correctness of the choice you made? How did you rule out the alternative? Without something substantive to show why your answer is more, rather than less, complete than the existing answer, this is no better than duplicative. – Rubio Feb 25 at 22:51
• (Can you show a reason why E=8 is not valid? Your equation does not rule it out... because it can't. This is why your answer is essentially equivalent to the one you copied, only you've added an unwarranted assumption that rules out a valid solution....) – Rubio Feb 26 at 12:06

## protected by Community♦Feb 25 at 22:54

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?