# Sandwich sums

- Difficulty: Beginner · Easy
- On the web: https://blinku.app/learn/sandwich-sum

The number outside a row or column is the sum of the digits sandwiched between its 1 and its 9, not counting the 1 and 9 themselves (on a 6×6 board, the 1 and 6; on an 8×8, the 1 and 8). Work out how far apart the 1 and 9 can be, and strike the places and candidates that don't fit.

Start with the extremes. A sum of 0 means the 1 and 9 are side by side. A sum of 35 means all of 2 to 8 lie between them, so the 1 and 9 sit at the two ends.

For other sums, count the cells between. A sum of 10 needs 2 cells (2+8, 3+7 or 4+6) or 3 cells (2+3+5): one cell can't reach 10, and four make at least 14 (2+3+4+5). So if the 1 is at one end of the row, the 9 can only be the fourth or fifth cell from that end.

## This example, step by step

Rows and columns are numbered as on the board's left and top: "r2c3" is row 2, column 3. Under the board are the clues drawn on it and written round it, one to a line.

```text
  1 2 3   4 5 6   7 8 9
1 . . . | . . . | . . .
2 . . 9 | 1 . 4 | . . .
3 . . . | . 3 . | . 9 .
  ------+-------+------
4 . . . | . . . | . 1 .
5 . . 4 | . . . | 7 . .
6 . 5 . | . . . | . . .
  ------+-------+------
7 . . . | . 5 . | . . .
8 . . . | 4 . 9 | . . .
9 . . . | . . . | . . .

Sandwich, row 1: the digits between 1 and 9 add up to 7
Sandwich, column 1: the digits between 1 and 9 add up to 18
Sandwich, column 2: the digits between 1 and 9 add up to 0
Sandwich, column 3: the digits between 1 and 9 add up to 17
Sandwich, column 4: the digits between 1 and 9 add up to 0
Sandwich, column 5: the digits between 1 and 9 add up to 0
Sandwich, column 6: the digits between 1 and 9 add up to 0
Sandwich, column 7: the digits between 1 and 9 add up to 24
Sandwich, column 8: the digits between 1 and 9 add up to 0
Sandwich, column 9: the digits between 1 and 9 add up to 24
Sandwich, row 2: the digits between 1 and 9 add up to 0
Sandwich, row 3: the digits between 1 and 9 add up to 0
Sandwich, row 4: the digits between 1 and 9 add up to 0
Sandwich, row 5: the digits between 1 and 9 add up to 13
Sandwich, row 6: the digits between 1 and 9 add up to 8
Sandwich, row 7: the digits between 1 and 9 add up to 10
Sandwich, row 8: the digits between 1 and 9 add up to 19
Sandwich, row 9: the digits between 1 and 9 add up to 4
```

1. **Where to look**: A pointer first: in column 4, the digits between 1 and 9 add to 0. Where can 1 and 9 go?
2. **Sandwich sums**: In column 4, the digits between 1 and 9 add to 0. With the column's candidates, 2, 5, 6, 8, and 9 can't give that, so they go.

## In hints

The hint shades the row or column blue, then strikes the candidates that can't fit the sum.
