Everyone guesses their hat at once
Asked at Jane Street, Citadel
prisoners each wear a hat labeled with a number from to (numbers may repeat, assigned adversarially). Each prisoner sees everyone else's hat but not their own. Simultaneously, with no communication, every prisoner writes down a guess for their own number.
Devise a strategy that guarantees at least one prisoner guesses correctly, no matter how the hats are assigned.
Show a hint
Have prisoner assume that the total of all hats is congruent to modulo . Why must one of these assumptions be right?
Your answer
This one is open-ended. Work it through, then check your reasoning against the full solution.