Painted Cube Puzzle counts painted unit cubes by separating every n × n × n small cube into four disjoint position classes — corners with three painted faces, edge-interior cubes with two, face-interior cubes with one, and a hidden core with none — and awards 200 points for each of the five fixed questions, up to 1,000. Each round begins with a fresh cube cut into equal unit cubes, then asks for the number of small cubes in one position class. Because all six outside faces are painted before the cut, the count for every class can be derived directly from the cube's edge length n without trial-and-error math. The five questions are deterministic, so a second pass through the puzzle is an opportunity to refine the method rather than hope for softer numbers. Tab, arrow keys, and Enter or Space give full keyboard control over the four-choice answer grid, and a touch-friendly two-column layout keeps the controls stable on narrow screens. One distinct wrong choice can be repaired on the same round, while a second distinct miss locks the run, after which Restart is the only path back to a fresh 1,000-point route.

What the Painted Cube Puzzle Counts
The puzzle has exactly one setup. A large cube is taken, all six of its outside faces are painted, and the solid is then cut into an n × n × n grid of equal unit cubes. After the cut, every unit cube belongs to one of four position classes, and each class corresponds to a specific number of painted faces:
- Corners that touch three painted faces.
- Edge-interior cubes that sit on an edge but not at a corner and touch two painted faces.
- Face-interior cubes that sit inside a face but away from its boundary and touch one painted face.
- Core cubes buried inside the solid that touch no painted faces.
Each of the five rounds in Painted Cube Puzzle asks for the count of one of these classes, or for the count of every cube touched by at least one painted face. The questions are fixed and the formulas are sourced from NRICH, the University of Cambridge's mathematics enrichment project, so the same logic drives every run rather than fresh arithmetic invented for the quiz.
The Four Position Classes
The four classes are disjoint and together account for every one of the n³ unit cubes in the cut. Keeping corners and edges in separate classes is what prevents the most common counting error, which is counting corner cubes a second time while working through the edges. A standard worked distribution for n = 4 from Math Is Fun cross-checks the same disjoint split, and the formulas match the Snow College mathematics contest 2019 answer key.
| Position class | Painted faces | Formula |
|---|---|---|
| Corner | 3 | 8 |
| Edge-interior | 2 | 12(n − 2) |
| Face-interior | 1 | 6(n − 2)² |
| Core | 0 | (n − 2)³ |
| Any painted | 1, 2, or 3 | n³ − (n − 2)³ |
The corner count is always 8 because the original solid has exactly eight corners no matter how finely it is cut. After removing the two corners from each of the 12 edges, every remaining position on those edges has exactly two painted faces, giving 12(n − 2). Each of the six faces then has an interior square of side n − 2 with one painted face, so 6(n − 2)² covers that class. Removing the outer layer one square deep leaves an unpainted cube of side n − 2, producing (n − 2)³ core cubes. The "any painted" total is the rest of the solid and can be reached either by adding the three painted classes together or by subtracting the core from the total, n³ − (n − 2)³. A companion guide, Cube Painting Question: Solve It with Position Classes, walks through the same classification with a slower pace if more reinforcement is preferred.
Counting Painted Unit Cubes Step by Step
The on-screen prompt names the requested class for the current n, and the four-choice grid presents four candidate counts. The following ordered routine keeps every answer grounded in the formulas above:
- Read the grid size n and the prompt word — corner, edge-interior, face-interior, core, or "any painted" — before touching any answer.
- Classify the request before calculating: corners are fixed at 8, edge-interior scales with 12(n − 2), face-interior with 6(n − 2)², core with (n − 2)³, and any painted with n³ − (n − 2)³.
- Use Tab to enter the answer grid and the arrow keys (or your finger on touch devices) to move through the two-by-two layout. Each move highlights a single answer, and the layout remains two columns even on narrow screens.
- Press Enter, Space, or tap the highlighted button to commit your choice. The same key or tap commits whichever cell is currently focused, so always check the focus before pressing.
- Compare your chosen value with the class formula before locking the answer. If the prompt says "exactly one painted face," every corner and edge-interior cube must be excluded; if it says "at least one," every painted class counts.
- Repeat for the remaining four rounds. Five correct answers reach the exact 1,000-point maximum.
A Worked Example for n = 4
Plugging n = 4 into the formulas produces every class for a 4 × 4 × 4 cut cube. The arithmetic is shown step by step so the same routine can be repeated for any other size the game asks for:
- Corner count: 8.
- Edge-interior count: 12 × (4 − 2) = 12 × 2 = 24.
- Face-interior count: 6 × (4 − 2)² = 6 × 2² = 6 × 4 = 24.
- Core count: (4 − 2)³ = 2³ = 8.
- Any painted count: 4³ − (4 − 2)³ = 64 − 8 = 56.
Conservation check: 8 + 24 + 24 + 8 = 64, matching the total number of unit cubes in a 4 × 4 × 4 solid. The same worked distribution is published by Math Is Fun's cut cube solution page and confirmed by automated tests across sizes 2 through 20.
Scoring, Repairs, and Restart
Each correct answer adds exactly 200 points to the run, so a perfect five rounds lands on the 1,000-point ceiling the puzzle advertises. Mistakes are handled with care rather than punished twice for the same misclick. One distinct wrong option is repairable on the same round, meaning the player can pick a different answer after seeing the miss. Repeating the same wrong option does not consume a second mistake, which keeps an accidental double-tap or a held key from ending an otherwise clean run. A second different wrong option locks the run entirely, and the screen freezes on the lockout state. Restart resets the puzzle to a fresh first question with the score cleared, and any other navigation is locked until the new run reaches its own terminal state. Terminal states are also frozen after a perfect completion, so the final score, progress, and miss totals cannot drift after the last round.
Keyboard and Touch Controls
Keyboard players can press Tab once to focus the answer grid, then use the arrow keys to move through the two-by-two layout. Enter or Space commits the currently highlighted answer, and every answer button has a minimum touch-friendly height so the same targets work for pointer and finger input. The layout stays two columns on narrow screens, which keeps the directional model stable on phones. Score, progress, misses, feedback, and terminal states are conveyed as text rather than colour alone, and the isometric cut diagram carries an accessible label describing the cube dimensions and the fact that all six outside faces were painted. Formulas and external checks come from NRICH, Snow College, and Math Is Fun, not from values invented for the quiz, which is what makes the same method work for every size from n = 2 up to n = 20. Readers who want a closer look at the keyboard and touch route can read Can I Play Painted Cube Puzzle with a Keyboard or Phone?