Hats with 100 colors

HardBrainteasers~11m

100 prisoners each receive a hat labelled with a number in {1,…,100}\{1,\dots,100\} (repeats allowed). Each sees everyone's hat but their own. Simultaneously, all write down a guess of their own number. If at least one is correct, all go free. Find a strategy that always wins.

Show hints (2)+
  1. Have each prisoner assume a different value for the total sum mod 100.
  2. Exactly one assumed residue matches the truth.

Answer

This is an open-ended question - work through it and compare your reasoning.

Create a free account to see the full worked solution and track your progress.

Interview format: Market Maker, Systematic & Data-Driven Trading

Related questions