





'''simple docstring'''


def       A							(      _UpperCAmelCase   :				int						,_UpperCAmelCase   :				int						,_UpperCAmelCase   :				int					)  ->				List[str]:


  '''simple docstring'''




  if power < 0:
    return -1
  base %= mod
  __lowerCAmelCase		:    Any			     =  1

  while power > 0:
    if power & 1:
      __lowerCAmelCase		:    Tuple			     =  (result * base) % mod
    __lowerCAmelCase		:    Dict			     =  power >> 1
    __lowerCAmelCase		:    int			     =  (base * base) % mod

  return result




def       A							(      )  ->				Any:


  '''simple docstring'''




  print(modular_exponential(3						,2_0_0						,1_3					)					)


if __name__ == "__main__":
    import doctest

    doctest.testmod()

    main()












'''simple docstring'''


from __future__ import annotations




def       A							(      _UpperCAmelCase   :				list[int]						,_UpperCAmelCase   :				int					)  ->				int:


  '''simple docstring'''




  __lowerCAmelCase     ,					__lowerCAmelCase		:    Dict			     =  0, len(_UpperCAmelCase					) - 1
  while start_ind <= end_ind:
    if array[start_ind] == search_item:
      return start_ind
    elif array[end_ind] == search_item:
      return end_ind
    else:
      start_ind += 1
      end_ind -= 1
    # returns -1 if search_item is not found in array
  return -1


if __name__ == "__main__":
    print(double_linear_search(list(range(1_00)), 40))





