Math logic puzzles
Use the clues to crack a secret code and check your answer on the page.
Three digits from 0 to 9, five clues.
Clues
Worked answer
- Clue 1 (1 3 9): nothing is correct, so 1, 3 and 9 are not in the code.
- Clue 2 (0 3 8): nothing is correct, so 0, 3 and 8 are not in the code.
- 60 codes avoid those digits.
- Clue 3 (3 6 2): one number is correct and well placed. 12 codes fit so far, using the digits 2, 4, 5, 6 and 7.
- Clue 4 (7 9 0): one number is correct and well placed. 4 codes fit so far, using the digits 2, 4, 5, 6 and 7.
- Clue 5 (4 5 3): one number is correct and well placed. Only one code is left.
- Every clue fits only one code: 7 5 2.
How to play
Each clue is a guess and tells you how many digits are right and well placed, and how many are right but misplaced. Find the one code that fits all the clues.
- A clue that says nothing is correct rules out all its digits.
- Test your code against every clue, not just one.
- Check shows which clues your code satisfies.

Print with answers
The board on page one, the answers on page two.
Math logic puzzles
Math logic puzzles ask you to use clues and deduction to find an answer. In this crack the code puzzle, you test a secret three-digit code against five clues until one code fits them all.
How to read the clues
A clue may say one number is correct and well placed, correct but wrongly placed, or that nothing is correct. Each statement narrows the possibilities. Start with the clue that rules digits out, then use the remaining clues to check which digits can stay and where they can go.
A simple method for cracking the code
Make a small table with one row for each clue and columns for the code's places. Cross out digits and positions a clue forbids. Then compare what remains across the clues, updating the table as each new detail limits your choices. Keep going until one code is left.
Why each puzzle has one answer
A fair code puzzle should have one solution that satisfies every clue. Each puzzle here is checked against every possible code, so exactly one code fits all the clues. You can enter your guess and check it against the puzzle's answer.
Questions
Can digits repeat?
No. The rule used here is that a code cannot repeat a digit. When you test a possibility, use three different digits and discard any code with a repeated digit.
Is there always one answer?
Yes. Each puzzle is checked against every possible code, and exactly one code fits all the clues. That gives you a single answer to find by testing the clues together.
Can I print it?
Yes. You can print the page from your browser if you want to work through the clues on paper. The puzzle is free to use, and you do not need to sign up.
More puzzles
Math crossword
Fill the grid so every row and column adds up.All levelsMagic square
Every row, column and diagonal makes the same sum.All levelsMath riddles
Short riddles with a checked answer.All levelsMatchstick puzzles
Move a match to fix the sum.All levelsMissing number
Find the rule, fill the gap.All levelsNumber pyramid
Each brick is the sum of the two below.All levelsPicture puzzles
Work out what each picture is worth.All levelsMake the target
Today’s puzzle: combine the tiles to hit the number.Daily
More ways to play
- Puzzles for kidsTry simple, checked puzzles that let kids practice counting, patterns, shapes, and number moves.
- Puzzles for adultsTry a varied set of puzzles that asks you to plan, calculate, and check each step.
- Target number solverEnter four to six numbers and a target to find routes using plus, minus, times, and divided by.
- 4 × 4 magic squareFill each cell so every row, column and diagonal adds to 34.
- Magic square solverEnter the numbers you know and see whether the solver can complete the square.
- Math mazeFollow the operations from start to target and find the one path that works.
- Magic trianglePlace the numbers so each side of the triangle has the same total.
- ArithmagonFind the hidden corner numbers from the sums shown on each edge.
- Tricky math questionsTest your quick answer, then check the steps that reveal where it went wrong.
- Math logic puzzlesUse the clues to crack a secret code and check your answer on the page.
- Printable crosswordsChoose your level and size, then print a fresh set of math crosswords to solve on paper.
- Daily puzzle archivePlay a make-the-target puzzle for any of the last thirty days at your level.