



from itertools import product







def  _snake_case			(							__snake_case = 1_5     )  ->  Any:






      '''simple docstring'''







      UpperCAmelCase_	:						float					   =		0.0
      UpperCAmelCase_	:						float
      UpperCAmelCase_	:						int
      UpperCAmelCase_	:						int
      UpperCAmelCase_	:						int
      UpperCAmelCase_	:						int
      UpperCAmelCase_	:						tuple[int, ...]

      for series in product(range(2     )       ,	repeat=_lowercase     ):
            UpperCAmelCase_	:						List[str]					   =		series.count(1     )
            UpperCAmelCase_	:						Dict					   =		num_turns - num_blue
            if num_red >= num_blue:
                  continue
            UpperCAmelCase_	:						List[Any]					   =		1.0
            for ind, col in enumerate(_lowercase       ,	2     ):
                  if col == 0:
                        prob *= (ind - 1) / ind
                  else:
                        prob *= 1 / ind

            total_prob += prob

      return int(1 / total_prob     )


if __name__ == "__main__":
   print(F'''{solution() = }''')





"""simple docstring"""
from transformers.models.cpm.tokenization_cpm import CpmTokenizer
from transformers.testing_utils import custom_tokenizers

from ..xlnet.test_modeling_xlnet import XLNetModelTest
@custom_tokenizers
class 							lowerCamelCase    (     _lowerCAmelCase							):






					'''simple docstring'''





					def   lowerCAmelCase_							(			self:				Optional[int]		,	snake_case:				Optional[Any]		,	snake_case:				Optional[Any]		,	snake_case:				Tuple		,	snake_case:				int		,	snake_case:				Optional[Any]		)  ->      int:
											return True






					def   lowerCAmelCase_							(			self:				Tuple		)  ->      Optional[int]:
											snake_case_					:Dict		=     CpmTokenizer.from_pretrained("""TsinghuaAI/CPM-Generate"""		)
											snake_case_					:Any		=     """Hugging Face大法好，谁用谁知道。"""
											snake_case_					:Union[str, Any]		=     """Hugging Face大法好,谁用谁知道。<unk>"""
											snake_case_					:Dict		=     """▁Hu gg ing ▁ ▂ ▁F ace ▁大法 ▁好 ▁ , ▁谁 ▁用 ▁谁 ▁知 道 ▁ 。""".split()

											snake_case_					:str		=     tokenizer.tokenize(snake_case		)
											self.assertListEqual(snake_case		,	snake_case		)

											snake_case_					:List[Any]		=     tokens + [tokenizer.unk_token]

											snake_case_					:Optional[Any]		=     [13_789, 13_283, 1_421, 8, 10, 1_164, 13_608, 16_528, 63, 8, 9, 440, 108, 440, 121, 90, 8, 12, 0]
											self.assertListEqual(tokenizer.convert_tokens_to_ids(snake_case		)		,	snake_case		)

											snake_case_					:int		=     tokenizer.decode(snake_case		)
											self.assertEqual(snake_case		,	snake_case		)
