I decided to support andyshevchenko in the publication of Friday's puzzles, and to ask, probably, the most difficult puzzle that I ever solved.
The king called 100 of his wise men in the evening and announced that in the morning he would give them a test. If they pass him, he will provide them with gold for the rest of his life, if not, he will execute them all. The king told the sages what the test will be: he will put on every sage a hat, which may be one of 100 colors, every sage does not see what color the hat is on him, but he sees what colors the hat is on his comrades. Sages will be forbidden to communicate. On command, they will have to simultaneously say how they think which hat is on them, and if at least one guesses it, then the test is considered to be passed. They have a night before the test to come up with a strategy. Imagine yourself in the place of the sages, and try to come up with the right strategy.
Explanation: Each wise man can have a hat of the same color, it is also possible that the colors of the hats on some wise men are the same, moreover, the king can wear hats of the same color on all wise men. It is only known that there are only 100 colors for hats and they are known.