





"""simple docstring"""
from __future__ import annotations

import math



def 					__lowerCamelCase       (							a_					:		int							)      ->				Optional[int]:


      if 1 < number < 4:
            # 2 and 3 are primes
            return True
      elif number < 2 or number % 2 == 0 or number % 3 == 0:
            # Negatives, 0, 1, all even numbers, all multiples of 3 are not primes
            return False

      # All primes number are in format of 6k +/- 1
      for i in range(5			,       int(math.sqrt(lowerCAmelCase__							) + 1							)			,       6							):
            if number % i == 0 or number % (i + 2) == 0:
                  return False
      return True



def 					__lowerCamelCase       (							a_					:		int							)      ->				Dict:
      __SCREAMING_SNAKE_CASE       :str		    =  str(lowerCAmelCase__							)
      __SCREAMING_SNAKE_CASE       :int		    =  [n]
      for i in range(1			,       len(lowerCAmelCase__							)							):
            list_nums.append(int(str_num[i:]							)							)
            list_nums.append(int(str_num[:-i]							)							)
      return list_nums



def 					__lowerCamelCase       (							a_					:		int							)      ->				List[str]:


      if len(str(lowerCAmelCase__							)							) > 3:
            if not is_prime(int(str(lowerCAmelCase__							)[-3:]							)							) or not is_prime(int(str(lowerCAmelCase__							)[:3]							)							):
                  return False
      return True



def 					__lowerCamelCase       (							a_					:		int = 11							)      ->				Dict:
      __SCREAMING_SNAKE_CASE       :list[int]		    =  []
      __SCREAMING_SNAKE_CASE       :Union[str, Any]		    =  13
      while len(lowerCAmelCase__							) != count:
            if validate(lowerCAmelCase__							):
                  __SCREAMING_SNAKE_CASE       :int		    =  list_truncated_nums(lowerCAmelCase__							)
                  if all(is_prime(lowerCAmelCase__							) for i in list_nums							):
                        list_truncated_primes.append(lowerCAmelCase__							)
            num += 2
      return list_truncated_primes



def 					__lowerCamelCase       (							)      ->				List[Any]:
      return sum(compute_truncated_primes(11							)							)


if __name__ == "__main__":
  print(f'{sum(compute_truncated_primes(1_1)) = }')








"""simple docstring"""
from itertools import product



def 					__lowerCamelCase       (							a_					:		int			,       a_					:		int							)      ->				list[int]:
      __SCREAMING_SNAKE_CASE       :Tuple		    =  sides_number
      __SCREAMING_SNAKE_CASE       :List[Any]		    =  max_face_number * dice_number
      __SCREAMING_SNAKE_CASE       :List[Any]		    =  [0] * (max_total + 1)

      __SCREAMING_SNAKE_CASE       :Optional[int]		    =  1
      __SCREAMING_SNAKE_CASE       :Tuple		    =  range(a_			,       max_face_number + 1							)
      for dice_numbers in product(a_			,       repeat=a_							):
            __SCREAMING_SNAKE_CASE       :Any		    =  sum(a_							)
            totals_frequencies[total] += 1

      return totals_frequencies



def 					__lowerCamelCase       (							)      ->				float:
      __SCREAMING_SNAKE_CASE       :Dict		    =  total_frequency_distribution(
          sides_number=4			,       dice_number=9							)
      __SCREAMING_SNAKE_CASE       :Union[str, Any]		    =  total_frequency_distribution(
          sides_number=6			,       dice_number=6							)

      __SCREAMING_SNAKE_CASE       :Optional[Any]		    =  0
      __SCREAMING_SNAKE_CASE       :Any		    =  9
      __SCREAMING_SNAKE_CASE       :List[str]		    =  4 * 9
      __SCREAMING_SNAKE_CASE       :Dict		    =  6
      for peter_total in range(a_			,       max_peter_total + 1							):
            peter_wins_count += peter_totals_frequencies[peter_total] * sum(
                colin_totals_frequencies[min_colin_total:peter_total]							)

      __SCREAMING_SNAKE_CASE       :List[str]		    =  (4**9) * (6**6)
      __SCREAMING_SNAKE_CASE       :Union[str, Any]		    =  peter_wins_count / total_games_number

      __SCREAMING_SNAKE_CASE       :str		    =  round(a_			,       ndigits=7							)

      return rounded_peter_win_probability


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