


"""simple docstring"""


def _lowerCamelCase			(	_UpperCamelCase = 5000_0000   ):

			'''simple docstring'''




			__lowerCAmelCase       					=    set()
			__lowerCAmelCase       					=    int((limit - 24) ** (1 / 2)   )

			__lowerCAmelCase       					=    set(range(3					,				prime_square_limit + 1					,				2   )   )
			primes.add(2   )
			for p in range(3					,				prime_square_limit + 1					,				2   ):
						if p not in primes:
									continue
						primes.difference_update(set(range(p * p					,				prime_square_limit + 1					,				_UpperCamelCase   )   )   )

			for primea in primes:
						__lowerCAmelCase       					=    primea * primea
						for primea in primes:
									__lowerCAmelCase       					=    primea * primea * primea
									if square + cube >= limit - 16:
												break
									for primea in primes:
												__lowerCAmelCase       					=    primea * primea * primea * primea
												__lowerCAmelCase       					=    square + cube + tetr
												if total >= limit:
															break
												ret.add(_UpperCamelCase   )

			return len(_UpperCamelCase   )


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








"""simple docstring"""


from itertools import product


def _lowerCamelCase			(	_UpperCamelCase					,				_UpperCamelCase   ):

			'''simple docstring'''




			__lowerCAmelCase       					=    sides_number
			__lowerCAmelCase       					=    max_face_number * dice_number
			__lowerCAmelCase       					=    [0] * (max_total + 1)

			__lowerCAmelCase       					=    1
			__lowerCAmelCase       					=    range(_UpperCamelCase					,				max_face_number + 1   )
			for dice_numbers in product(_UpperCamelCase					,				repeat=_UpperCamelCase   ):
						__lowerCAmelCase       					=    sum(_UpperCamelCase   )
						totals_frequencies[total] += 1

			return totals_frequencies


def _lowerCamelCase			(	):

			'''simple docstring'''




			__lowerCAmelCase       					=    total_frequency_distribution(
			    sides_number=4					,				dice_number=9   )
			__lowerCAmelCase       					=    total_frequency_distribution(
			    sides_number=6					,				dice_number=6   )

			__lowerCAmelCase       					=    0
			__lowerCAmelCase       					=    9
			__lowerCAmelCase       					=    4 * 9
			__lowerCAmelCase       					=    6
			for peter_total in range(_UpperCamelCase					,				max_peter_total + 1   ):
						peter_wins_count += peter_totals_frequencies[peter_total] * sum(
						    colin_totals_frequencies[min_colin_total:peter_total]   )

			__lowerCAmelCase       					=    (4**9) * (6**6)
			__lowerCAmelCase       					=    peter_wins_count / total_games_number

			__lowerCAmelCase       					=    round(_UpperCamelCase					,				ndigits=7   )

			return rounded_peter_win_probability


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




