Printing gives you all 20 puzzles without the answers, and the answer key on a page of its own. On screen, type your answer under a puzzle and press Check, or open the step by step answer.
How the clues work
Every puzzle hides a code with no repeated digits. A code can start with 0. Each clue shows a guess and tells you two things about it: how many of its digits are in the code at all, and how many of those sit in the right place.
- "Exactly 1 digit is correct and in the correct position." One digit of the guess is in the code, in that exact spot. The others aren't in the code.
- "Exactly 1 digit is in the code but in a different position." One digit is in the code, somewhere else. The others aren't in the code.
- "None of these digits is in the code." Cross all of them out. This is usually the best place to start.
Clues with bigger numbers work the same way, just with more digits. Every puzzle here has exactly one code that fits all its clues, and you can always reach it by reasoning, without trying codes at random.
Lock riddles, 3 digits
The kind you've seen on a padlock picture: three digits and a handful of clues. A good warm up.
B1 3 digits, 4 clues
Guess Clue 028 None of these digits is in the code. 941 Exactly 1 digit is in the code but in a different position. 675 Exactly 2 digits are in the code but in different positions. 146 Exactly 2 digits are correct and in the correct positions. Code:
Answer to B1
The code is 156. Step by step:
- Clue 1 says none of its digits is in the code. 0, 2 and 8 aren't in the code.
- Clue 2 has no digit in the right slot. 1 isn't in slot 3; 4 isn't in slot 2; 9 isn't in slot 1.
- Clue 3 has no digit in the right slot. 5 isn't in slot 3; 6 isn't in slot 1; 7 isn't in slot 2.
- Clue 4 needs 2 digits in the right slot, and only 1 and 6 can still be there. 1 goes in slot 1; 6 goes in slot 3.
- 4 has no slot left where it could go. 4 isn't in the code.
- 7 has no slot left where it could go. 7 isn't in the code.
- Clue 2 has 2 digits that aren't in the code, and only 9 and 4 can still be missing. 9 isn't in the code.
- Clue 3 has 1 digit that isn't in the code, and 7 is already that one. 5 is in the code.
- The code has 3 digits, and you already know 1, 5 and 6 are in it. 3 isn't in the code.
B2 3 digits, 4 clues
Guess Clue 092 Exactly 1 digit is correct and in the correct position. 172 Exactly 1 digit is in the code but in a different position. 327 Exactly 2 digits are correct and in the correct positions. 016 None of these digits is in the code. Code:
Answer to B2
The code is 397. Step by step:
- Clue 4 says none of its digits is in the code. 0, 1 and 6 aren't in the code.
- Clue 1 has no correct digit in a different slot. 2 isn't in slots 1 or 2; 9 isn't in slots 1 or 3.
- Clue 2 has no digit in the right slot. 2 isn't in slot 3; 7 isn't in slot 2.
- 2 has no slot left where it could go. 2 isn't in the code.
- Clue 1 needs 1 digit in the right slot, and only 9 can still be there. 9 goes in slot 2.
- Clue 2 has 2 digits that aren't in the code, and 1 and 2 are already those. 7 is in the code.
- Clue 3 needs 2 digits in the right slot, and only 3 and 7 can still be there. 3 goes in slot 1; 7 goes in slot 3.
B3 3 digits, 4 clues
Guess Clue 420 Exactly 2 digits are in the code but in different positions. 539 Exactly 1 digit is in the code but in a different position. 957 None of these digits is in the code. 643 Exactly 1 digit is in the code but in a different position. Code:
Answer to B3
The code is 302. Step by step:
- Clue 3 says none of its digits is in the code. 9, 5 and 7 aren't in the code.
- Clue 1 has no digit in the right slot. 0 isn't in slot 3; 2 isn't in slot 2; 4 isn't in slot 1.
- Clue 2 has no digit in the right slot. 3 isn't in slot 2.
- Clue 2 has 2 digits that aren't in the code, and 5 and 9 are already those. 3 is in the code.
- Clue 4 has no digit in the right slot. 3 isn't in slot 3; 4 isn't in slot 2; 6 isn't in slot 1.
- Clue 4 has 2 digits that aren't in the code, and only 6 and 4 can still be missing. 6 and 4 aren't in the code.
- Clue 1 has 1 digit that isn't in the code, and 4 is already that one. 2 and 0 are in the code.
- The code has 3 digits, and you already know 0, 2 and 3 are in it. 1 and 8 aren't in the code.
- Only 0 can still go in slot 2. 0 goes in slot 2.
- Only 2 can still go in slot 3. 2 goes in slot 3.
B4 3 digits, 4 clues
Guess Clue 691 Exactly 1 digit is in the code but in a different position. 670 Exactly 1 digit is in the code but in a different position. 192 Exactly 2 digits are correct and in the correct positions. 679 None of these digits is in the code. Code:
Answer to B4
The code is 102. Step by step:
- Clue 4 says none of its digits is in the code. 6, 7 and 9 aren't in the code.
- Clue 1 has no digit in the right slot. 1 isn't in slot 3.
- Clue 1 has 2 digits that aren't in the code, and 6 and 9 are already those. 1 is in the code.
- Clue 2 has no digit in the right slot. 0 isn't in slot 3.
- Clue 2 has 2 digits that aren't in the code, and 6 and 7 are already those. 0 is in the code.
- Clue 3 needs 2 digits in the right slot, and only 1 and 2 can still be there. 1 goes in slot 1; 2 goes in slot 3.
- The code has 3 digits, and you already know 0, 1 and 2 are in it. 3, 4, 5 and 8 aren't in the code.
B5 3 digits, 4 clues
Guess Clue 184 Exactly 1 digit is correct and in the correct position. 802 None of these digits is in the code. 367 Exactly 2 digits are in the code but in different positions. 137 Exactly 1 digit is in the code but in a different position. Code:
Answer to B5
The code is 674. Step by step:
- Clue 2 says none of its digits is in the code. 8, 0 and 2 aren't in the code.
- Clue 1 has no correct digit in a different slot. 1 isn't in slots 2 or 3; 4 isn't in slots 1 or 2.
- Clue 3 has no digit in the right slot. 3 isn't in slot 1; 6 isn't in slot 2; 7 isn't in slot 3.
- Clue 4 has no digit in the right slot. 1 isn't in slot 1; 3 isn't in slot 2.
- 1 has no slot left where it could go. 1 isn't in the code.
- Clue 1 needs 1 digit in the right slot, and only 4 can still be there. 4 goes in slot 3.
- 3 has no slot left where it could go. 3 isn't in the code.
- Clue 3 has 1 digit that isn't in the code, and 3 is already that one. 6 and 7 are in the code.
- The code has 3 digits, and you already know 4, 6 and 7 are in it. 5 and 9 aren't in the code.
- Only 7 can still go in slot 2. 7 goes in slot 2.
B6 3 digits, 5 clues
Guess Clue 038 Exactly 1 digit is correct and in the correct position. 609 Exactly 1 digit is in the code but in a different position. 980 Exactly 1 digit is correct and in the correct position. 201 None of these digits is in the code. 416 Exactly 1 digit is in the code but in a different position. Code:
Answer to B6
The code is 934. Step by step:
- Clue 4 says none of its digits is in the code. 2, 0 and 1 aren't in the code.
- Clue 1 has no correct digit in a different slot. 3 isn't in slots 1 or 3; 8 isn't in slots 1 or 2.
- Clue 2 has no digit in the right slot. 6 isn't in slot 1; 9 isn't in slot 3.
- Clue 3 needs 1 digit in the right slot, and only 9 can still be there. 9 goes in slot 1.
- Clue 2 has 2 digits that aren't in the code, and only 6 and 0 can still be missing. 6 isn't in the code.
- Clue 3 has 2 digits that aren't in the code, and only 8 and 0 can still be missing. 8 isn't in the code.
- Clue 1 needs 1 digit in the right slot, and only 3 can still be there. 3 goes in slot 2.
- Clue 5 has 2 digits that aren't in the code, and 1 and 6 are already those. 4 is in the code.
- The code has 3 digits, and you already know 3, 4 and 9 are in it. 5 and 7 aren't in the code.
4 digits
One more digit, and clues where some digits are right and some are only in the code.
M1 4 digits, 6 clues
Guess Clue 2490 Exactly 2 digits are correct in total, of which 1 is in the correct position. 9238 Exactly 2 digits are in the code but in different positions. 8217 Exactly 1 digit is in the code but in a different position. 7981 None of these digits is in the code. 4096 Exactly 1 digit is correct and in the correct position. 6284 Exactly 1 digit is in the code but in a different position. Code:
Answer to M1
The code is 2053. Step by step:
- Clue 4 says none of its digits is in the code. 7, 9, 8 and 1 aren't in the code.
- Clue 2 has no digit in the right slot. 2 isn't in slot 2; 3 isn't in slot 3.
- Clue 2 has 2 digits that aren't in the code, and 9 and 8 are already those. 2 and 3 are in the code.
- Clue 5 has no correct digit in a different slot. 0 isn't in slots 1, 3 or 4; 4 isn't in slots 2, 3 or 4; 6 isn't in slots 1, 2 or 3.
- Clue 1 needs 1 digit in the right slot, and only 2 can still be there. 2 goes in slot 1.
- Only 5 can still go in slot 3. 5 goes in slot 3.
- 4 has no slot left where it could go. 4 isn't in the code.
- Clue 1 has 2 digits that aren't in the code, and 4 and 9 are already those. 0 is in the code.
- Clue 5 has 1 digit in the right slot, and 0 is already that one. 6 isn't in slot 4.
- Only 3 can still go in slot 4. 3 goes in slot 4.
M2 4 digits, 6 clues
Guess Clue 5762 Exactly 1 digit is in the code but in a different position. 3594 Exactly 1 digit is correct and in the correct position. 7438 None of these digits is in the code. 6275 Exactly 1 digit is correct and in the correct position. 3761 Exactly 1 digit is in the code but in a different position. 4967 Exactly 1 digit is in the code but in a different position. Code:
Answer to M2
The code is 1290. Step by step:
- Clue 3 says none of its digits is in the code. 7, 4, 3 and 8 aren't in the code.
- Clue 1 has no digit in the right slot. 2 isn't in slot 4; 5 isn't in slot 1; 6 isn't in slot 3.
- Clue 2 has no correct digit in a different slot. 5 isn't in slots 3 or 4; 9 isn't in slots 1, 2 or 4.
- Clue 4 has no correct digit in a different slot. 2 isn't in slots 1 or 3; 5 isn't in slot 2; 6 isn't in slots 2 or 4.
- 5 has no slot left where it could go. 5 isn't in the code.
- Clue 2 needs 1 digit in the right slot, and only 9 can still be there. 9 goes in slot 3.
- Clue 5 has no digit in the right slot. 1 isn't in slot 4.
- Only 0 can still go in slot 4. 0 goes in slot 4.
- Clue 6 has 3 digits that aren't in the code, and only 4, 6 and 7 can still be missing. 6 isn't in the code.
- Only 1 can still go in slot 1. 1 goes in slot 1.
- Only 2 can still go in slot 2. 2 goes in slot 2.
M3 4 digits, 6 clues
Guess Clue 3862 Exactly 1 digit is correct and in the correct position. 4165 Exactly 2 digits are correct in total, of which 1 is in the correct position. 9576 Exactly 1 digit is in the code but in a different position. 6037 Exactly 1 digit is in the code but in a different position. 9174 Exactly 1 digit is in the code but in a different position. 7125 Exactly 1 digit is correct and in the correct position. Code:
Answer to M3
The code is 0845. Step by step:
- Clue 1 has no correct digit in a different slot. 2 isn't in slots 1, 2 or 3; 3 isn't in slots 2, 3 or 4; 6 isn't in slots 1, 2 or 4; 8 isn't in slots 1, 3 or 4.
- Clue 3 has no digit in the right slot. 5 isn't in slot 2; 7 isn't in slot 3; 9 isn't in slot 1.
- Clue 4 has no digit in the right slot. 0 isn't in slot 2; 7 isn't in slot 4.
- Clue 5 has no digit in the right slot. 1 isn't in slot 2; 4 isn't in slot 4.
- Clue 6 has no correct digit in a different slot. 1 isn't in slots 1, 3 or 4; 2 isn't in slot 4; 5 isn't in slots 1 or 3; 7 isn't in slot 2.
- 1 has no slot left where it could go. 1 isn't in the code.
- 2 has no slot left where it could go. 2 isn't in the code.
- Clue 2 needs 1 correct digit in a different slot, and only 4 can still be that one. 4 is in the code; 4 isn't in slot 1.
- Clue 5 has 3 digits that aren't in the code, and only 9, 1 and 7 can still be missing. 9 and 7 aren't in the code.
- Clue 6 needs 1 digit in the right slot, and only 5 can still be there. 5 goes in slot 4.
- Clue 2 has 1 digit in the right slot, and 5 is already that one. 6 isn't in slot 3.
- 6 has no slot left where it could go. 6 isn't in the code.
- Suppose 0 goes in slot 3. Then clue 4 can't be true anymore. 0 isn't in slot 3.
- Only 4 can still go in slot 3. 4 goes in slot 3.
- Only 8 can still go in slot 2. 8 goes in slot 2.
- Clue 1 has 1 digit in the right slot, and 8 is already that one. 3 isn't in slot 1.
- Only 0 can still go in slot 1. 0 goes in slot 1.
M4 4 digits, 6 clues
Guess Clue 9145 Exactly 1 digit is in the code but in a different position. 5384 Exactly 2 digits are in the code but in different positions. 1258 Exactly 2 digits are correct in total, of which 1 is in the correct position. 7634 Exactly 1 digit is correct and in the correct position. 8763 Exactly 2 digits are correct in total, of which 1 is in the correct position. 3169 Exactly 1 digit is in the code but in a different position. Code:
Answer to M4
The code is 8650. Step by step:
- Clue 1 has no digit in the right slot. 1 isn't in slot 2; 4 isn't in slot 3; 5 isn't in slot 4; 9 isn't in slot 1.
- Clue 2 has no digit in the right slot. 3 isn't in slot 2; 4 isn't in slot 4; 5 isn't in slot 1; 8 isn't in slot 3.
- Clue 4 has no correct digit in a different slot. 3 isn't in slots 1 or 4; 4 isn't in slots 1 or 2; 6 isn't in slots 1, 3 or 4; 7 isn't in slots 2, 3 or 4.
- 4 has no slot left where it could go. 4 isn't in the code.
- Clue 5 needs 1 digit in the right slot, and only 8 can still be there. 8 goes in slot 1.
- 7 has no slot left where it could go. 7 isn't in the code.
- Clue 3 has 1 correct digit in a different slot, and 8 is already that one. 1 isn't in slots 3 or 4; 2 isn't in slots 3 or 4; 5 isn't in slot 2.
- 1 has no slot left where it could go. 1 isn't in the code.
- Clue 6 has no digit in the right slot. 9 isn't in slot 4.
- Only 0 can still go in slot 4. 0 goes in slot 4.
- Suppose 9 goes in slot 3. Then clue 2 can't be true anymore. 9 isn't in slot 3.
- Suppose 3 is in the code. Then clue 6 can't be true anymore. 3 isn't in the code.
- Only 5 can still go in slot 3. 5 goes in slot 3.
- Clue 1 has 3 digits that aren't in the code, and only 9, 1 and 4 can still be missing. 9 isn't in the code.
- Clue 3 has 1 digit in the right slot, and 5 is already that one. 2 isn't in slot 2.
- Only 6 can still go in slot 2. 6 goes in slot 2.
M5 4 digits, 5 clues
Guess Clue 5231 Exactly 3 digits are correct in total, of which 1 is in the correct position. 8361 Exactly 2 digits are in the code but in different positions. 7935 Exactly 2 digits are correct and in the correct positions. 4596 None of these digits is in the code. 4386 Exactly 1 digit is in the code but in a different position. Code:
Answer to M5
The code is 7132. Step by step:
- Clue 4 says none of its digits is in the code. 4, 5, 9 and 6 aren't in the code.
- Clue 1 has 1 digit that isn't in the code, and 5 is already that one. 2, 3 and 1 are in the code.
- Clue 2 has no digit in the right slot. 1 isn't in slot 4; 3 isn't in slot 2; 8 isn't in slot 1.
- Clue 2 has 2 digits that aren't in the code, and only 8 and 6 can still be missing. 8 isn't in the code.
- Clue 3 needs 2 digits in the right slot, and only 7 and 3 can still be there. 7 goes in slot 1; 3 goes in slot 3.
- Clue 1 has 1 digit in the right slot, and 3 is already that one. 2 isn't in slot 2.
- The code has 4 digits, and you already know 1, 2, 3 and 7 are in it. 0 isn't in the code.
M6 4 digits, 5 clues
Guess Clue 2716 None of these digits is in the code. 8634 Exactly 3 digits are correct in total, of which 2 are in the correct positions. 5931 Exactly 2 digits are in the code but in different positions. 7402 Exactly 1 digit is in the code but in a different position. 9742 Exactly 1 digit is in the code but in a different position. Code:
Answer to M6
The code is 8354. Step by step:
- Clue 1 says none of its digits is in the code. 2, 7, 1 and 6 aren't in the code.
- Clue 2 has 1 digit that isn't in the code, and 6 is already that one. 8, 3 and 4 are in the code.
- Clue 3 has no digit in the right slot. 3 isn't in slot 3; 5 isn't in slot 1; 9 isn't in slot 2.
- Clue 2 needs 2 digits in the right slot, and only 8 and 4 can still be there. 8 goes in slot 1; 4 goes in slot 4.
- Clue 4 has no digit in the right slot. 0 isn't in slot 3.
- Clue 4 has 3 digits that aren't in the code, and only 7, 0 and 2 can still be missing. 0 isn't in the code.
- Clue 5 has 3 digits that aren't in the code, and only 9, 7 and 2 can still be missing. 9 isn't in the code.
- Only 5 can still go in slot 3. 5 goes in slot 3.
4 digits, harder
These need at least one "what if" step: suppose a digit is in the code, follow it through, and see it break a clue.
H1 4 digits, 5 clues
Guess Clue 2394 Exactly 2 digits are in the code but in different positions. 9328 Exactly 2 digits are correct in total, of which 1 is in the correct position. 9325 Exactly 2 digits are correct in total, of which 1 is in the correct position. 7896 Exactly 1 digit is correct and in the correct position. 5178 Exactly 1 digit is in the code but in a different position. Code:
Answer to H1
The code is 7023. Step by step:
- Clue 1 has no digit in the right slot. 2 isn't in slot 1; 3 isn't in slot 2; 4 isn't in slot 4; 9 isn't in slot 3.
- Clue 4 has no correct digit in a different slot. 6 isn't in slots 1, 2 or 3; 7 isn't in slots 2, 3 or 4; 8 isn't in slots 1, 3 or 4; 9 isn't in slots 1, 2 or 4.
- 9 has no slot left where it could go. 9 isn't in the code.
- Clue 2 needs 1 digit in the right slot, and only 2 can still be there. 2 goes in slot 3.
- Clue 3 has 1 digit in the right slot, and 2 is already that one. 5 isn't in slot 4.
- Clue 5 has no digit in the right slot. 1 isn't in slot 2; 5 isn't in slot 1.
- Suppose 1 goes in slot 4. Then clue 4 can't be true anymore. 1 isn't in slot 4.
- Suppose 5 goes in slot 2. Then clue 3 can't be true anymore. 5 isn't in slot 2.
- 5 has no slot left where it could go. 5 isn't in the code.
- Clue 3 has 2 digits that aren't in the code, and 9 and 5 are already those. 3 is in the code.
- Clue 1 has 2 digits that aren't in the code, and only 9 and 4 can still be missing. 4 isn't in the code.
- Clue 2 has 2 digits that aren't in the code, and only 9 and 8 can still be missing. 8 isn't in the code.
- Only 0 can still go in slot 2. 0 goes in slot 2.
- Suppose 3 goes in slot 1. Then clue 5 can't be true anymore. 3 isn't in slot 1.
- Suppose 6 is in the code. Then slot 4 would have no digit left. 6 isn't in the code.
- Clue 4 needs 1 digit in the right slot, and only 7 can still be there. 7 goes in slot 1.
H2 4 digits, 7 clues
Guess Clue 8530 Exactly 1 digit is correct and in the correct position. 2740 Exactly 1 digit is in the code but in a different position. 5316 Exactly 2 digits are in the code but in different positions. 1574 Exactly 2 digits are in the code but in different positions. 7916 Exactly 3 digits are correct in total, of which 1 is in the correct position. 4708 Exactly 1 digit is in the code but in a different position. 8523 Exactly 1 digit is in the code but in a different position. Code:
Answer to H2
The code is 7139. Step by step:
- Clue 1 has no correct digit in a different slot. 0 isn't in slots 1, 2 or 3; 3 isn't in slots 1, 2 or 4; 5 isn't in slots 1, 3 or 4; 8 isn't in slots 2, 3 or 4.
- Clue 2 has no digit in the right slot. 0 isn't in slot 4; 2 isn't in slot 1; 4 isn't in slot 3; 7 isn't in slot 2.
- 0 has no slot left where it could go. 0 isn't in the code.
- Clue 3 has no digit in the right slot. 1 isn't in slot 3; 6 isn't in slot 4.
- Clue 4 has no digit in the right slot. 1 isn't in slot 1; 4 isn't in slot 4; 5 isn't in slot 2; 7 isn't in slot 3.
- 5 has no slot left where it could go. 5 isn't in the code.
- Clue 6 has no digit in the right slot. 4 isn't in slot 1.
- Clue 7 has no digit in the right slot. 2 isn't in slot 3; 8 isn't in slot 1.
- 8 has no slot left where it could go. 8 isn't in the code.
- Clue 1 needs 1 digit in the right slot, and only 3 can still be there. 3 goes in slot 3.
- Clue 7 has 3 digits that aren't in the code, and only 8, 5 and 2 can still be missing. 2 isn't in the code.
- Suppose 9 goes in slot 1. Then clue 5 can't be true anymore. 9 isn't in slot 1.
- Suppose 1 goes in slot 4. Then clue 5 can't be true anymore. 1 isn't in slot 4.
- Suppose 6 goes in slot 2. Then clue 4 can't be true anymore. 6 isn't in slot 2.
- Suppose 9 goes in slot 2. Then clue 4 can't be true anymore. 9 isn't in slot 2.
- Clue 5 needs 1 digit in the right slot, and only 7 can still be there. 7 goes in slot 1.
- Only 9 can still go in slot 4. 9 goes in slot 4.
- 6 has no slot left where it could go. 6 isn't in the code.
- Clue 2 has 3 digits that aren't in the code, and only 2, 4 and 0 can still be missing. 4 isn't in the code.
- Only 1 can still go in slot 2. 1 goes in slot 2.
H3 4 digits, 8 clues
Guess Clue 7609 Exactly 2 digits are correct in total, of which 1 is in the correct position. 6378 Exactly 2 digits are in the code but in different positions. 4305 Exactly 2 digits are correct in total, of which 1 is in the correct position. 2538 Exactly 1 digit is in the code but in a different position. 9653 Exactly 2 digits are in the code but in different positions. 3825 Exactly 1 digit is correct and in the correct position. 2806 Exactly 1 digit is in the code but in a different position. 0976 Exactly 2 digits are in the code but in different positions. Code:
Answer to H3
The code is 7465. Step by step:
- Clue 2 has no digit in the right slot. 3 isn't in slot 2; 6 isn't in slot 1; 7 isn't in slot 3; 8 isn't in slot 4.
- Clue 4 has no digit in the right slot. 2 isn't in slot 1; 3 isn't in slot 3; 5 isn't in slot 2.
- Clue 5 has no digit in the right slot. 3 isn't in slot 4; 5 isn't in slot 3; 6 isn't in slot 2; 9 isn't in slot 1.
- Clue 6 has no correct digit in a different slot. 2 isn't in slots 2 or 4; 5 isn't in slot 1; 8 isn't in slots 1 or 3.
- Clue 7 has no digit in the right slot. 0 isn't in slot 3; 6 isn't in slot 4; 8 isn't in slot 2.
- 8 has no slot left where it could go. 8 isn't in the code.
- Clue 8 has no digit in the right slot. 0 isn't in slot 1; 9 isn't in slot 2.
- Suppose 4 goes in slot 4. Then clue 3 can't be true anymore. 4 isn't in slot 4.
- Suppose 7 goes in slot 4. Then clue 1 can't be true anymore. 7 isn't in slot 4.
- Suppose 3 goes in slot 1. Then clue 3 can't be true anymore. 3 isn't in slot 1.
- 3 has no slot left where it could go. 3 isn't in the code.
- Clue 2 has 2 digits that aren't in the code, and 3 and 8 are already those. 6 and 7 are in the code.
- Clue 1 has 2 digits that aren't in the code, and only 0 and 9 can still be missing. 0 and 9 aren't in the code.
- Clue 1 needs 1 digit in the right slot, and only 7 can still be there. 7 goes in slot 1.
- Clue 3 needs 1 digit in the right slot, and only 5 can still be there. 5 goes in slot 4.
- Clue 3 has 2 digits that aren't in the code, and 3 and 0 are already those. 4 is in the code.
- Clue 4 has 3 digits that aren't in the code, and only 2, 3 and 8 can still be missing. 2 isn't in the code.
- The code has 4 digits, and you already know 4, 5, 6 and 7 are in it. 1 isn't in the code.
- Only 4 can still go in slot 2. 4 goes in slot 2.
H4 4 digits, 6 clues
Guess Clue 0657 Exactly 3 digits are correct in total, of which 1 is in the correct position. 0695 Exactly 2 digits are in the code but in different positions. 7430 Exactly 3 digits are in the code but in different positions. 9486 Exactly 1 digit is in the code but in a different position. 1560 Exactly 2 digits are correct in total, of which 1 is in the correct position. 2973 Exactly 1 digit is in the code but in a different position. Code:
Answer to H4
The code is 4507. Step by step:
- Clue 2 has no digit in the right slot. 0 isn't in slot 1; 5 isn't in slot 4; 6 isn't in slot 2; 9 isn't in slot 3.
- Clue 3 has no digit in the right slot. 0 isn't in slot 4; 3 isn't in slot 3; 4 isn't in slot 2; 7 isn't in slot 1.
- Clue 4 has no digit in the right slot. 6 isn't in slot 4; 8 isn't in slot 3; 9 isn't in slot 1.
- Clue 6 has no digit in the right slot. 2 isn't in slot 1; 3 isn't in slot 4; 7 isn't in slot 3; 9 isn't in slot 2.
- Suppose 2 is in the code. Then clue 3 can't be true anymore. 2 isn't in the code.
- Suppose 4 isn't in the code. Then clue 6 can't be true anymore. 4 is in the code.
- Clue 4 has 3 digits that aren't in the code, and only 9, 8 and 6 can still be missing. 9, 8 and 6 aren't in the code.
- Clue 1 has 1 digit that isn't in the code, and 6 is already that one. 0, 5 and 7 are in the code.
- Clue 3 has 1 digit that isn't in the code, and only 3 can still be missing. 3 isn't in the code.
- Clue 5 has 2 digits that aren't in the code, and only 1 and 6 can still be missing. 1 isn't in the code.
- Clue 5 needs 1 digit in the right slot, and only 5 can still be there. 5 goes in slot 2.
- Only 4 can still go in slot 1. 4 goes in slot 1.
5 digits
The longest codes, with up to nine clues. Keep a grid of digits and positions on scrap paper.
E1 5 digits, 9 clues
Guess Clue 74890 Exactly 2 digits are in the code but in different positions. 16523 Exactly 3 digits are correct in total, of which 1 is in the correct position. 47396 Exactly 1 digit is correct and in the correct position. 89024 Exactly 2 digits are in the code but in different positions. 28306 Exactly 2 digits are in the code but in different positions. 76451 Exactly 3 digits are in the code but in different positions. 73408 Exactly 2 digits are in the code but in different positions. 13847 Exactly 2 digits are in the code but in different positions. 13095 Exactly 3 digits are in the code but in different positions. Code:
Answer to E1
The code is 07512. Step by step:
- Clue 1 has no digit in the right slot. 0 isn't in slot 5; 4 isn't in slot 2; 7 isn't in slot 1; 8 isn't in slot 3; 9 isn't in slot 4.
- Clue 3 has no correct digit in a different slot. 3 isn't in slots 1, 2, 4 or 5; 4 isn't in slots 3, 4 or 5; 6 isn't in slots 1, 2, 3 or 4; 7 isn't in slots 3, 4 or 5; 9 isn't in slots 1, 2, 3 or 5.
- 9 has no slot left where it could go. 9 isn't in the code.
- Clue 4 has no digit in the right slot. 0 isn't in slot 3; 2 isn't in slot 4; 8 isn't in slot 1.
- Clue 5 has no digit in the right slot. 0 isn't in slot 4; 2 isn't in slot 1; 3 isn't in slot 3; 6 isn't in slot 5; 8 isn't in slot 2.
- 3 has no slot left where it could go. 3 isn't in the code.
- 6 has no slot left where it could go. 6 isn't in the code.
- Clue 2 has 2 digits that aren't in the code, and 6 and 3 are already those. 1, 5 and 2 are in the code.
- Clue 6 has no digit in the right slot. 1 isn't in slot 5; 5 isn't in slot 4.
- Clue 7 has no digit in the right slot. 8 isn't in slot 5.
- Clue 8 has no digit in the right slot. 1 isn't in slot 1.
- Clue 2 needs 1 digit in the right slot, and only 5 can still be there. 5 goes in slot 3.
- Only 2 can still go in slot 5. 2 goes in slot 5.
- Clue 9 has 2 digits that aren't in the code, and 3 and 9 are already those. 0 is in the code.
- Clue 4 has 3 digits that aren't in the code, and only 8, 9 and 4 can still be missing. 8 and 4 aren't in the code.
- Only 0 can still go in slot 1. 0 goes in slot 1.
- Only 1 can still go in slot 4. 1 goes in slot 4.
- Only 7 can still go in slot 2. 7 goes in slot 2.
E2 5 digits, 8 clues
Guess Clue 06871 Exactly 2 digits are in the code but in different positions. 25198 Exactly 3 digits are correct in total, of which 1 is in the correct position. 37085 Exactly 2 digits are in the code but in different positions. 26398 Exactly 3 digits are correct in total, of which 1 is in the correct position. 84513 Exactly 1 digit is in the code but in a different position. 27031 Exactly 2 digits are in the code but in different positions. 83701 Exactly 1 digit is correct and in the correct position. 34582 Exactly 2 digits are in the code but in different positions. Code:
Answer to E2
The code is 52796. Step by step:
- Clue 1 has no digit in the right slot. 0 isn't in slot 1; 1 isn't in slot 5; 6 isn't in slot 2; 7 isn't in slot 4; 8 isn't in slot 3.
- Clue 3 has no digit in the right slot. 0 isn't in slot 3; 3 isn't in slot 1; 5 isn't in slot 5; 7 isn't in slot 2; 8 isn't in slot 4.
- Clue 5 has no digit in the right slot. 1 isn't in slot 4; 3 isn't in slot 5; 4 isn't in slot 2; 5 isn't in slot 3; 8 isn't in slot 1.
- Clue 6 has no digit in the right slot. 2 isn't in slot 1; 3 isn't in slot 4.
- Clue 7 has no correct digit in a different slot. 0 isn't in slots 2 or 5; 1 isn't in slots 1, 2 or 3; 3 isn't in slot 3; 7 isn't in slots 1 or 5; 8 isn't in slots 2 or 5.
- 1 has no slot left where it could go. 1 isn't in the code.
- 8 has no slot left where it could go. 8 isn't in the code.
- Clue 2 has 2 digits that aren't in the code, and 1 and 8 are already those. 2, 5 and 9 are in the code.
- Clue 4 needs 1 digit in the right slot, and only 9 can still be there. 9 goes in slot 4.
- 0 has no slot left where it could go. 0 isn't in the code.
- Clue 1 has 3 digits that aren't in the code, and 0, 8 and 1 are already those. 6 and 7 are in the code.
- Clue 2 has 1 digit in the right slot, and 9 is already that one. 5 isn't in slot 2.
- Clue 3 has 3 digits that aren't in the code, and only 3, 0 and 8 can still be missing. 3 isn't in the code.
- Only 2 can still go in slot 2. 2 goes in slot 2.
- Clue 5 has 4 digits that aren't in the code, and only 8, 4, 1 and 3 can still be missing. 4 isn't in the code.
- Only 6 can still go in slot 5. 6 goes in slot 5.
E3 5 digits, 9 clues
Guess Clue 98214 Exactly 2 digits are in the code but in different positions. 81537 Exactly 3 digits are correct in total, of which 1 is in the correct position. 30198 Exactly 2 digits are in the code but in different positions. 03916 Exactly 2 digits are in the code but in different positions. 61285 Exactly 2 digits are in the code but in different positions. 05197 Exactly 4 digits are in the code but in different positions. 17429 Exactly 3 digits are correct in total, of which 1 is in the correct position. 98351 Exactly 2 digits are in the code but in different positions. 96108 Exactly 2 digits are in the code but in different positions. Code:
Answer to E3
The code is 14570. Step by step:
- Clue 1 has no digit in the right slot. 1 isn't in slot 4; 2 isn't in slot 3; 4 isn't in slot 5; 8 isn't in slot 2; 9 isn't in slot 1.
- Clue 3 has no digit in the right slot. 0 isn't in slot 2; 1 isn't in slot 3; 3 isn't in slot 1; 8 isn't in slot 5; 9 isn't in slot 4.
- Clue 4 has no digit in the right slot. 0 isn't in slot 1; 3 isn't in slot 2; 6 isn't in slot 5; 9 isn't in slot 3.
- Clue 5 has no digit in the right slot. 1 isn't in slot 2; 5 isn't in slot 5; 6 isn't in slot 1; 8 isn't in slot 4.
- Clue 6 has no digit in the right slot. 5 isn't in slot 2; 7 isn't in slot 5.
- Clue 8 has no digit in the right slot. 1 isn't in slot 5; 3 isn't in slot 3; 5 isn't in slot 4.
- Clue 9 has no digit in the right slot. 0 isn't in slot 4; 6 isn't in slot 2.
- Suppose 0 isn't in the code. Then clue 8 can't be true anymore. 0 is in the code.
- Suppose 3 is in the code. Then clue 6 can't be true anymore. 3 isn't in the code.
- Suppose 5 goes in slot 1. Then clue 2 can't be true anymore. 5 isn't in slot 1.
- Suppose 8 goes in slot 1. Then clue 2 can't be true anymore. 8 isn't in slot 1.
- Clue 2 needs 1 digit in the right slot, and only 5 can still be there. 5 goes in slot 3.
- 8 has no slot left where it could go. 8 isn't in the code.
- Clue 2 has 2 digits that aren't in the code, and 8 and 3 are already those. 1 and 7 are in the code.
- Clue 3 has 3 digits that aren't in the code, and only 3, 9 and 8 can still be missing. 9 isn't in the code.
- Clue 4 has 3 digits that aren't in the code, and only 3, 9 and 6 can still be missing. 6 isn't in the code.
- Clue 5 has 3 digits that aren't in the code, and only 6, 2 and 8 can still be missing. 2 isn't in the code.
- Clue 1 has 3 digits that aren't in the code, and 9, 8 and 2 are already those. 4 is in the code.
- Clue 7 has 1 digit in the right slot, and 1 is already that one. 7 isn't in slot 2.
- Only 4 can still go in slot 2. 4 goes in slot 2.
- Only 7 can still go in slot 4. 7 goes in slot 4.
E4 5 digits, 7 clues
Guess Clue 93106 Exactly 2 digits are in the code but in different positions. 68190 Exactly 3 digits are in the code but in different positions. 09364 Exactly 2 digits are in the code but in different positions. 68743 Exactly 3 digits are correct in total, of which 1 is in the correct position. 60493 Exactly 2 digits are in the code but in different positions. 63701 Exactly 2 digits are in the code but in different positions. 03854 Exactly 3 digits are correct in total, of which 1 is in the correct position. Code:
Answer to E4
The code is 16845. Step by step:
- Clue 1 has no digit in the right slot. 0 isn't in slot 4; 1 isn't in slot 3; 3 isn't in slot 2; 6 isn't in slot 5; 9 isn't in slot 1.
- Clue 2 has no digit in the right slot. 0 isn't in slot 5; 6 isn't in slot 1; 8 isn't in slot 2; 9 isn't in slot 4.
- Clue 3 has no digit in the right slot. 0 isn't in slot 1; 3 isn't in slot 3; 4 isn't in slot 5; 6 isn't in slot 4; 9 isn't in slot 2.
- Clue 5 has no digit in the right slot. 0 isn't in slot 2; 3 isn't in slot 5; 4 isn't in slot 3.
- Clue 6 has no digit in the right slot. 1 isn't in slot 5; 7 isn't in slot 3.
- Clue 4 needs 1 digit in the right slot, and only 4 can still be there. 4 goes in slot 4.
- Clue 7 needs 1 digit in the right slot, and only 8 can still be there. 8 goes in slot 3.
- 0 has no slot left where it could go. 0 isn't in the code.
- Suppose 1 isn't in the code. Then clue 3 can't be true anymore. 1 is in the code.
- Suppose 3 is in the code. Then clue 2 can't be true anymore. 3 isn't in the code.
- Clue 7 has 2 digits that aren't in the code, and 0 and 3 are already those. 5 is in the code.
- Suppose 2 is in the code. Then clue 1 can't be true anymore. 2 isn't in the code.
- Suppose 6 isn't in the code. Then the code would need too many digits. 6 is in the code.
- Clue 1 has 3 digits that aren't in the code, and only 9, 3 and 0 can still be missing. 9 isn't in the code.
- Clue 4 has 2 digits that aren't in the code, and only 7 and 3 can still be missing. 7 isn't in the code.
- Only 5 can still go in slot 5. 5 goes in slot 5.
- Only 1 can still go in slot 1. 1 goes in slot 1.
A quick method
- Cross out the none clues.
Every digit in a "none of these" clue is gone, everywhere.
- Use those cross outs on the other clues.
Once a clue's dead digits are gone, its count often has only one way to fit.
- Place digits by position.
A digit that's "in the code but in a different position" can't sit where that guess had it.
- Try a what if.
When you're stuck, suppose a digit is in the code and follow the clues. If one breaks, the digit is out.
The full guide to solving code breaker puzzles works through three puzzles step by step, including the famous 682 riddle.
How these were made
The puzzles come from the generator in my game Crack the Vault, the same one behind the daily code breaker on this site. Each answer above was written by the same step by step solver that gives the hints in the daily code breaker, so every step is one you can follow with a pencil. Before the page goes up, a separate program tries every possible code against every clue to make sure exactly one fits.
| Puzzle | Kind | Code |
|---|---|---|
| B1 | Lock riddles, 3 digits | 156 |
| B2 | Lock riddles, 3 digits | 397 |
| B3 | Lock riddles, 3 digits | 302 |
| B4 | Lock riddles, 3 digits | 102 |
| B5 | Lock riddles, 3 digits | 674 |
| B6 | Lock riddles, 3 digits | 934 |
| M1 | 4 digits | 2053 |
| M2 | 4 digits | 1290 |
| M3 | 4 digits | 0845 |
| M4 | 4 digits | 8650 |
| M5 | 4 digits | 7132 |
| M6 | 4 digits | 8354 |
| H1 | 4 digits, harder | 7023 |
| H2 | 4 digits, harder | 7139 |
| H3 | 4 digits, harder | 7465 |
| H4 | 4 digits, harder | 4507 |
| E1 | 5 digits | 07512 |
| E2 | 5 digits | 52796 |
| E3 | 5 digits | 14570 |
| E4 | 5 digits | 16845 |
Questions
Can I use these in class?
Yes. Print as many copies as you like for your class or club. The answer key prints on its own page, so you can hand out the puzzles without it.
Can a digit appear twice in the code?
Not in these puzzles. Every code uses different digits, and so does every guess.
Is there only one answer to each?
Yes. Every possible code was tested against every clue, and exactly one fits each puzzle.
Where can I play more?
There are three new vaults every day in the daily code breaker, and my Crack the Vault app for Android has 500 levels from 3 to 5 digits with hints that explain each step.
Crack the Vault
500 levels from 3 to 5 digits, a daily vault, and hints that explain the next step.