Hard
Hard
22 XP

The Hat Color Puzzle

3,309 solved 51% solve rate 49% fail rate
100 prisoners stand in a line. Each wears a black or white hat. Each can see all hats in front but not their own or behind. Starting from the back, each must guess their hat color. What strategy saves 99 prisoners guaranteed?
Only 51% solve this correctly
3,309 attempts
Earn +22 XP for solving
Quick Answer & Explanation
The last person counts

The answer to this riddle is The last person counts. Difficulty: Hard · Solved by 3,309 puzzle lovers.

The last person counts the number of black hats he sees. If odd, he says black; if even, he says white. Each subsequent person uses this parity info plus previous answers to deduce their color.
🧠 Play Today's Riddle