


"""simple docstring"""






def        A_					(					UpperCAmelCase__				)     ->     bool:
   if not isinstance(_UpperCAmelCase       ,   _UpperCAmelCase				):
      raise ValueError('Input series is not valid, valid series - [2, 4, 8]'				)
   if len(_UpperCAmelCase				) == 0:
      raise ValueError('Input list must be a non empty list'				)
   if len(_UpperCAmelCase				) == 1:
      return True
   try:
      a   :	Dict						=    series[1] / series[0]
      for index in range(len(_UpperCAmelCase				) - 1				):
         if series[index + 1] / series[index] != common_ratio:
            return False
   except ZeroDivisionError:
      return False
   return True




def        A_					(					UpperCAmelCase__				)     ->     float:
   if not isinstance(_UpperCAmelCase       ,   _UpperCAmelCase				):
      raise ValueError('Input series is not valid, valid series - [2, 4, 8]'				)
   if len(_UpperCAmelCase				) == 0:
      raise ValueError('Input list must be a non empty list'				)
   a   :	List[str]						=    1
   for value in series:
      answer *= value
   return pow(_UpperCAmelCase       ,   1 / len(_UpperCAmelCase				)				)


if __name__ == "__main__":
 import doctest

 doctest.testmod()










import sys

sys.set_int_max_str_digits(0)  # type: ignore





def 				A      (	_UpperCAmelCase							:  int       )							->					bool:







			'''simple docstring'''
			_UpperCAmelCase									=  [0] * 11
			_UpperCAmelCase									=  [0] * 11

			# mark last 9 numbers
			for _ in range(9       ):
						_UpperCAmelCase									=  1
						_UpperCAmelCase									=  number // 10
			# flag
			_UpperCAmelCase									=  True

			# check last 9 numbers for pandigitality

			for x in range(9       ):
						if not check_last[x + 1]:
									_UpperCAmelCase									=  False
			if not f:
						return f

			# mark first 9 numbers
			_UpperCAmelCase									=  int(str(_UpperCAmelCase       )[:9]       )

			for _ in range(9       ):
						_UpperCAmelCase									=  1
						_UpperCAmelCase									=  number // 10

			# check first 9 numbers for pandigitality

			for x in range(9       ):
						if not check_front[x + 1]:
									_UpperCAmelCase									=  False
			return f





def 				A      (	_UpperCAmelCase							:  int       )							->					bool:







			'''simple docstring'''
			_UpperCAmelCase									=  [0] * 11

			# mark last 9 numbers
			for _ in range(9       ):
						_UpperCAmelCase									=  1
						_UpperCAmelCase									=  number // 10
			# flag
			_UpperCAmelCase									=  True

			# check last 9 numbers for pandigitality

			for x in range(9       ):
						if not check_last[x + 1]:
									_UpperCAmelCase									=  False
			return f





def 				A      (	)							->					int:







			'''simple docstring'''
			_UpperCAmelCase									=  1
			_UpperCAmelCase									=  1
			_UpperCAmelCase									=  2
			# temporary Fibonacci numbers

			_UpperCAmelCase									=  1
			_UpperCAmelCase									=  1
			_UpperCAmelCase									=  2
			# temporary Fibonacci numbers mod 1e9

			# mod m=1e9, done for fast optimisation
			_UpperCAmelCase									=  [0] * 1_000_000
			_UpperCAmelCase									=  1_000_000_000

			for x in range(1_000_000       ):
						_UpperCAmelCase									=  (aa + ba) % m
						_UpperCAmelCase									=  ba % m
						_UpperCAmelCase									=  ca % m
						if checka(_UpperCAmelCase       ):
									_UpperCAmelCase									=  1

			for x in range(1_000_000       ):
						_UpperCAmelCase									=  a + b
						_UpperCAmelCase									=  b
						_UpperCAmelCase									=  c
						# perform check only if in tocheck
						if tocheck[x + 3] and check(_UpperCAmelCase       ):
									return x + 3  # first 2 already done
			return -1


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