12
$\begingroup$

My friend has a safe lock, with a numeric password of 4 digits (varying between 0-9 each). She lost the password and looked for my help. Fortunately, I was able to hack it. I could try some different combinations and check how many numbers I got right.

I tried the number 8086 => Only 1 number is right, but in the wrong position.

I tried the number 8857 => Only 1 number is right, but in the wrong position.

I tried the number 0159 => I got 3 numbers right, all in the correct position.

And then the hack stopped working. If I insert just one wrong number, the safe lock will break.

Am I able to open this lock with the information provided by my hack? If so, what is the password?

$\endgroup$
14
$\begingroup$

I think the correct password is

0179

Reasoning

Combining the second and third clues tells us that '5' is not in the combination, otherwise it would be in the correct position in the second combination. Therefore, 0, 1, and 9 are all in the correct position in the last combination. The first clue tells us that the third digit is not 8. Using the second clue again, the only remaining option is 7.

$\endgroup$
  • $\begingroup$ Ah, sniped! Well done! $\endgroup$ – Matt Mar 15 at 16:21
  • $\begingroup$ Seconds away from beating you! $\endgroup$ – Greg Mar 15 at 16:21
  • $\begingroup$ Well done!! Got me too! $\endgroup$ – El-Guest Mar 15 at 16:22

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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