My question is regarding to the question which was asked here: A riddle about guessing hat colours (which is not among the commonly known ones)
$100$ prisoners are put a hat on top of their head, which can be red or blue. The colours are chosen at random by $100$ independent fair coin tosses. Then each prisoner can guess their own hat colour (red or blue) or pass. The prisoners can see each other, but not hear each other's calls and of course they have no other means of communication. This means that each call can only depend on the other prisoners' hat colours. However, before the distributing of hats begins, the prisoners are told the rules and can agree on a strategy. The prisoners win iff no prisoner guesses wrong and at least one prisoner guesses right. Which strategy should the prisoners use so that the winning probability becomes maximal?
on this question they found answer for $n=2^k-1$ and $2^k$ but my question is how can I solve for other cases? specificly for $n=100$