1
$\begingroup$

A Number Lock has 3 digit key. ### that should fulfil the following conditions:

6 8 2 - One Number is well placed and correct.
6 1 4 - One Number is correct but wrong placed.
2 0 6 - Two Numbers are correct but wrong placed.
7 3 8 - Nothing is correct.
7 8 0 - One Number is correct but wrong placed.

Can you crack the code ?

$\endgroup$
0

2 Answers 2

1
$\begingroup$

0 4 2

Because

One of 6 8 2 is correct and the right spot. By the second line, we can eliminate 6, which didn't change position, but would now have to be in the wrong spot. By the 5th line, we eliminate 8, as well. This means that the code is x x 2.
The third line tells us that 0 is in the code, but not in the middle or last position. The code is now 0 x 2. Neither of these numbers appears in the second line, which indicates that either 1 or 4 is correct, but not in the right spot. The only one of these two not in the middle is 4, therefore, the code is 0 4 2.

$\endgroup$
1
$\begingroup$

042

because:

4 tells us no 7,3,8, therefore by 5, 0 is in it. 3 tells us 0 is first. 1 then tells us 2 is last. 3 tells us 6 isn't in it, and 2 tells us 4 is in the middle.

$\endgroup$

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