
'''simple docstring'''
def        A_     (						__SCREAMING_SNAKE_CASE						:  int = 6008_5147_5143 )				->       int:





  """simple docstring"""

  try:
    __A		:     Any												=		int(__SCREAMING_SNAKE_CASE )
  except (TypeError, ValueError):
    raise TypeError("""Parameter n must be int or castable to int.""" )
  if n <= 0:
    raise ValueError("""Parameter n must be greater than or equal to one.""" )
  __A		:     str												=		1
  __A		:     Any												=		2
  while i * i <= n:
    while n % i == 0:
      __A		:     Optional[int]												=		i
      n //= i
    i += 1
  if n > 1:
    __A		:     str												=		n
  return int(__SCREAMING_SNAKE_CASE )


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





'''simple docstring'''
from collections.abc import Sequence







def        A_     (						__SCREAMING_SNAKE_CASE						:  Sequence[float]			,     __SCREAMING_SNAKE_CASE						:  bool = False )				->       float:





  """simple docstring"""

  if not arr:
    return 0

  __A		:     Any												=		0 if allow_empty_subarrays else float("""-inf""" )
  __A		:     List[Any]												=		0.0
  for num in arr:
    __A		:     Tuple												=		max(0 if allow_empty_subarrays else num			,     curr_sum + num )
    __A		:     Optional[int]												=		max(__SCREAMING_SNAKE_CASE			,     __SCREAMING_SNAKE_CASE )

  return max_sum


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

     testmod()

     A__   :		Any 		=[-2, 1, -3, 4, -1, 2, 1, -5, 4]
     print(F"{max_subarray_sum(nums) = }")



