One credit card’s security code is a three-digit number. Now there are five numbers: 874, 765, 123, 364 and 925. If each number shares only one digit with the security code that has the same position and value, what is the code?

In these problems, we will be faced with several codes/numbers which have digits in common with a target number, and asked to determine that target number. The key is simply going to be to find patterns within the set of numbers we have, and see where we have the most info—then, once we’ve used it, we can draw additional conclusions from there, and we’ll be done.

We list out those numbers vertically for a clear view:

874

765

123

364

925

Those five common digits should be at the hundreds, tens and units digits. Since the hundreds digits are all different and no digit is shared in the same spot by three codes, the hundreds digit should come from the code which shares no common digits with another number. Also, no code should have two such common digits. This means we should pick, for the last two digits, 24, which leaves 765 unmatched, so our code is 724.

In these problems, it is important to do casework on each digit, and apply what you know from one digit to finding out more about the others.