275.
^=required in one or the other
Possible codes: (0-9)(0-9)(0-9)
2 4 1 - One number is correct and well placed
There are 3 possibilities.
1: 2 is the first digit in the code, and 4 and 1 are not in the code.
2: 4 is the second digit in the code, and 2 and 1 are not in the code.
3: 1 is the third digit in the code, and 2 and 4 are not in the code.
4 1 3 - Nothing is correct
New information: 4, 1, and 3 are not in the code.
This disproves 2 of our 3 current possibilities, meaning that possibility 1 is correct.
Possible codes: 2 (2, 5, 6, 7, 8, 9, 0)(2, 5, 6, 7, 8, 9, 0)
5 3 2 - Two numbers are correct but wrong places
We already know that 2 is the first digit and 3 isn't in the code, meaning that 5 is the other correct number.
Possible codes: 2 (2, 5^, 6, 7, 8, 9, 0)(2, 5^, 6, 7, 8, 9, 0)
3 4 7 - One number is correct but wrong placed
We already know that 3 and 7 aren't in the code, meaning that 7 is the correct number.
Going over our current information, we realize that because the only other unknown digit other than the one that belongs in the third place, the 7 can only go in the second place. After confirming 7's place, we only have one place remaining. 5 needs to fit in somewhere, so it must go in the 3rd place. This means that the code is 275.
7 5 1 - Two numbers are correct but wrong places
We have already discovered the answer, so we can recognize that this is just an extra hint for those who might not be keeping track of their possible combinations. 7 has been proved to not be in the 1st or 3rd place, and 5 is not in the 1st or 2nd, and that 2 is the 1st, meaning that the code is 275.