





from __future__ import annotations

from itertools import permutations
from random import randint
from timeit import repeat






def     lowerCamelCase__			():
     _SCREAMING_SNAKE_CASE       :	Tuple						    =							[randint(-1000,       1000	) for i in range(10	)]
     _SCREAMING_SNAKE_CASE       :	int						    =							randint(-5000,       5000	)
     return (arr, r)


UpperCamelCase__      =make_dataset()






def     lowerCamelCase__			(__lowerCamelCase,       __lowerCamelCase	):
     for triplet in permutations(__lowerCamelCase,       3	):
          if sum(__lowerCamelCase	) == target:
               return tuple(sorted(__lowerCamelCase	)	)
     return (0, 0, 0)






def     lowerCamelCase__			(__lowerCamelCase,       __lowerCamelCase	):
     arr.sort()
     _SCREAMING_SNAKE_CASE       :	List[str]						    =							len(__lowerCamelCase	)
     for i in range(n - 1	):
          _SCREAMING_SNAKE_CASE    ,			_SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							i + 1, n - 1
          while left < right:
               if arr[i] + arr[left] + arr[right] == target:
                    return (arr[i], arr[left], arr[right])
               elif arr[i] + arr[left] + arr[right] < target:
                    left += 1
               elif arr[i] + arr[left] + arr[right] > target:
                    right -= 1
     return (0, 0, 0)






def     lowerCamelCase__			():
     _SCREAMING_SNAKE_CASE       :	Optional[int]						    =							"\nfrom __main__ import dataset, triplet_sum1, triplet_sum2\n"
     _SCREAMING_SNAKE_CASE       :	Dict						    =							"\ntriplet_sum1(*dataset)\n"
     _SCREAMING_SNAKE_CASE       :	str						    =							"\ntriplet_sum2(*dataset)\n"
     _SCREAMING_SNAKE_CASE       :	Optional[int]						    =							repeat(setup=__lowerCamelCase,       stmt=__lowerCamelCase,       repeat=5,       number=10000	)
     _SCREAMING_SNAKE_CASE       :	Tuple						    =							repeat(setup=__lowerCamelCase,       stmt=__lowerCamelCase,       repeat=5,       number=10000	)
     return (min(__lowerCamelCase	), min(__lowerCamelCase	))


if __name__ == "__main__":
       from doctest import testmod

       testmod()
       UpperCamelCase__      =solution_times()
       print(f"The time for naive implementation is {times[0]}.")
       print(f"The time for optimized implementation is {times[1]}.")






from __future__ import annotations

UpperCamelCase__      =[True] * 100_0001
UpperCamelCase__      =2
while i * i <= 100_0000:
       if seive[i]:
              for j in range(i * i, 100_0001, i):
                     UpperCamelCase__      =False
       i += 1






def     lowerCamelCase__			(__lowerCamelCase	):
     return seive[n]






def     lowerCamelCase__			(__lowerCamelCase	):
     return any(digit in "02468" for digit in str(__lowerCamelCase	)	)






def     lowerCamelCase__			(__lowerCamelCase = 1000000	):
     _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							[2]  # result already includes the number 2.
     for num in range(3,       limit + 1,       2	):
          if is_prime(__lowerCamelCase	) and not contains_an_even_digit(__lowerCamelCase	):
               _SCREAMING_SNAKE_CASE       :	List[Any]						    =							str(__lowerCamelCase	)
               _SCREAMING_SNAKE_CASE       :	Optional[Any]						    =							[int(str_num[j:] + str_num[:j]	) for j in range(len(__lowerCamelCase	)	)]
               if all(is_prime(__lowerCamelCase	) for i in list_nums	):
                    result.append(__lowerCamelCase	)
     return result






def     lowerCamelCase__			():
     return len(find_circular_primes()	)


if __name__ == "__main__":
       print(f"{len(find_circular_primes()) = }")