gizmobench

Sandwich Sudoku

Sandwich Sudoku keeps every ordinary Sudoku rule and adds a clue beside each row and column: the sum of the digits sitting between that line's 1 and 9. Every puzzle here is original, generated on this page from a seed, and offered only after a solver proves it has exactly one solution using the given digits and all 18 sandwich clues. Choose Gentle, Standard or Tough for 30, 22 or 16 given digits, enter digits or pencil notes by tap or keyboard, undo and redo, and watch repeats and impossible sandwich totals turn red from the rules alone. Print a clue-only sheet, with a separate answer key only when you ask for one. Solve a fresh Standard puzzle without help and you can send the same puzzle as a scored challenge.

Fill the grid so every row, column and box holds 1 to 9 once. Each clue on the edge is the sum of the digits between the 1 and the 9 in that row or column.

Original 9 × 9 puzzleWaiting for a puzzle
Building a puzzle
A new puzzle appears once a solver has proved it has exactly one solution.
Puzzle and rules
The sandwich rule
A row reading 1 2 3 9 4 5 6 7 8 has clue 5, because only 2 and 3 sit between its 1 and 9. A 1 next to a 9 gives 0. The clue never says which digits, only their total.

Preparing an original Sandwich Sudoku.

  • 1 2 3 9 4 5 6 7 8Row or columnClue 5: only 2 and 3 sit between the 1 and the 9.
  • 4 1 9 2 3 5 6 7 81 next to 9Clue 0: nothing sits between them.
  • Clue 35Largest possibleThe 1 and 9 sit at opposite ends with 2 to 8 between them.

Common questions

How do you play Sandwich Sudoku?
Place the digits 1 to 9 once in every row, every column and every 3 by 3 box, as in ordinary Sudoku. Each row has a clue on its left and each column a clue above it. The clue is the total of the digits that sit between the 1 and the 9 in that line, whichever comes first. A row reading 1 2 3 9 4 5 6 7 8 has clue 5, because only 2 and 3 are sandwiched. A 1 right next to a 9 gives 0. The largest clue, 35, means the 1 and 9 sit at opposite ends with 2 to 8 between them. Because the sandwiched digits are different and come from 2 to 8, a clue of 1 or 34 can never happen.
Does every puzzle here have exactly one solution?
Yes. A seeded search first fills a complete valid grid and works out all 18 sandwich clues from it. Given digits are then removed one at a time in a seeded order, and a removal is kept only when a search, limited to 20,000 steps, finds no solution that puts a different digit in that cell. Removal stops at the difficulty's given count. A separate solver that does not know the intended answer then searches for a second solution within 200,000 steps, and the puzzle is offered only if it finds exactly one and it matches. If the removal budget of 400,000 steps runs out first, that seed is not offered: Generate from seed keeps the previous puzzle on the board, and New puzzle moves on to the next seed. The solver counts steps instead of timing them, so a seed makes the same puzzle on every device.
What do Gentle, Standard and Tough mean?
They set how many digits are given at the start: 30 for Gentle, 22 for Standard and 16 for Tough. All three show every row and column clue. The label counts given digits; it is not a measured solving time. Standard is the fixed profile for scored challenges. Each difficulty draws its grid from its own seed sequence, so seed 7 at Gentle and seed 7 at Standard are different puzzles.
How do pencil notes, undo and conflict marks work?
Turn on Pencil notes, or press N on a keyboard, and digits toggle small candidate marks in a blank cell instead of filling it. Entering a digit clears that cell's notes. Undo and Redo step through every digit and note change until the puzzle is solved. A cell turns red when its digit repeats in a row, column or box, or when the 1 and 9 of a line are placed so that the digits between them can no longer reach the clue. Those marks come from the rules alone and never compare your digits with the answer. Fill one cell and Reveal solution are there when you want them, and each turns the run into assisted practice.
How is the challenge scored?
The challenge is one seeded original Standard puzzle with 22 given digits. Score is 1000 minus your final retained digit submissions, never below 0, and higher is better. The best possible score is 941, because the 59 blank cells each need at least one digit. Every changed digit you enter counts, including a wrong one, and entering a digit again after erasing it counts again. Pencil notes, erasing, and typing the digit a cell already shows do not count, and undo removes the undone submission. Undo and Redo stop once the puzzle is solved, so a solved score is final. Fill one cell, Reveal solution, an answer key printed before you finish, restored progress, replays and puzzles already opened in this browser stay practice. Scores are self-reported.
What happens when someone opens a challenge link?
The page shows the shared score, the fixed rules and a Start same challenge button. Nothing starts until they press it. The puzzle is regenerated from the seed in the link, so both players get the same grid and clues. After a fresh solve without help, the page shows both scores, the signed difference and whether the new score is better, tied or lower, plus a new link carrying the new score. Copy challenge link, Share challenge and Download result card are all offered. A link carries only the tool name, the seed, the fixed setting and the score: no digits, notes or play history. A challenge link with a damaged or altered value is refused with a message, and ordinary practice opens instead.
Can I print a puzzle or come back to it later?
Print puzzle prints the given digits and all 18 clues, without your entries, notes or the solution. Print puzzle and answer key adds the answer on a separate page, and makes an unfinished run assisted practice. Once you make a change, progress is saved in this browser without the solution. When you return, an unfinished puzzle is rebuilt from its seed and your saved history is replayed onto it; a save that does not match is refused. Restored progress is practice. Start over at the top of the page forgets the save.
Can I play with a keyboard or on a phone?
Yes. With a cell focused, press 1 to 9 to enter a digit, Backspace or Delete to clear it, the arrow keys to move and N to switch pencil notes. The digit pad, the four move buttons and a Selected cell list do the same without a keyboard, and on narrow screens those buttons are at least 44 pixels. The grid shrinks to fit the screen, and a text list gives every row and column clue with its current status.

Every row, column and 3 by 3 box holds 1 to 9 once, and each clue outside the grid is the sum of the digits between that line's 1 and 9. Each puzzle is original, generated here from its seed, and offered only after a separate bounded solver proves exactly one solution using every given digit and all 18 sandwich clues. The difficulty label sets how many digits are given; it is not a tested solving time.