Problem bank

Problem 111 of 333HardBrainteaserP111

Seven hats and modular arithmetic

  1. Seven prisoners stand in a circle. Each wears a hat that is one of seven colors (coded 0 through 6, repeats allowed). Every prisoner sees the other six hats but not their own. Simultaneously, each must call out a guess of their own hat's color. They cannot communicate during the guessing. If at least one prisoner is correct, all go free. They strategize beforehand. Find a winning strategy.