This lock has a 3 digit code
Can you crack it
using only these hints? 2 9 1
One number is correct
and in the right place,
2 4 5
One number is correct
but in the wrong place,
4 6 3
Two numbers are correct
but in the wrong place, 5 7 8
Nothing is correct, 5 6 9
One number is correct
but in the wrong place.
Answers
First of all exclude the numbers which aren't Correct. From Case 5) We can conclude that 5,7, and 8 aren't desired numbers. Let's move further
In Case 1)
• 2 9 1 - One digit is correct and in the right place
In Case 2)
• 2 4 5 - One digit is correct but in the wrong place
From Case 1) and Case 2) we can conclude that 2 is common in both the cases but in Case 1) It is at the right place and in Case 2) It is at wrong place. So 2 can't be the first number. Moving further :
In Case 3)
• 4 6 3 - Two numbers are correct but in the wrong place.
In Case 5)
• 5 6 9 - One number is correct but in the wrong place
From Case 1) and Case 5) we can conclude that 9 can be the middle digit
From Case 2) and Case 3) we can conclude that 4 can be the last digit (As according to Case 3) It can't be at first and according to the Case 2 It can't be at middle)
Till now, We've :
• _ 9 4
In Case 3) two numbers were correct and 4 is one of them. Left digits are 6 and 3
In Case 5) one digit was correct and we've found that 9 was the digit. Hence,6 can't be that number. Therefore,The Code is :