This is a logic puzzle that I really enjoy, but it doesn't translate well to the "input your answer" format. That aside, I thought people on Brilliant might enjoy it too.
The logic mastermind has taken 100 mathematicians hostage. The mathematicians are told that they will each be given a hat out of 100 possible colors (the mathematicians are told the possible colors in advance). The mathematicians must then simultaneously guess their own hat colors. (Note that they all must guess; no one may abstain.)
The mathematicians are able to see the other 99 hats but not their own. Moreover, they are not allowed to communicate any information to the other mathematicians (e.g. by physical movement or change in tone) on pain of death - they must only guess.
The mathematicians will be set free if EXACTLY ONE mathematician guesses correctly. Unfortunately, they are told that their hat colors may not necessarily be distinct - for example, while there are 100 possible hat colors, they might all be given yellow hats.
The mathematicians are allowed to devise a strategy before they don their hats and guess. Can they succeed and win their freedom? If so, what is their strategy?