from collections.abc import Sequence







def  __UpperCamelCase    (						A ,							A = False							):
     if not arr:
          return 0

     UpperCamelCase__										=      0 if allow_empty_subarrays else float('''-inf'''							)
     UpperCamelCase__										=      0.0
     for num in arr:
          UpperCamelCase__										=      max(0 if allow_empty_subarrays else num ,							curr_sum + num							)
          UpperCamelCase__										=      max(A ,							A							)

     return max_sum


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

     testmod()

     __magic_name__								=[-2, 1, -3, 4, -1, 2, 1, -5, 4]
     print(f"""{max_subarray_sum(nums) = }""")




def  __UpperCamelCase    (						A = 600851475143							):

     try:
          UpperCamelCase__										=      int(A							)
     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.'''							)
     UpperCamelCase__										=      1
     UpperCamelCase__										=      2
     while i * i <= n:
          while n % i == 0:
               UpperCamelCase__										=      i
               n //= i
          i += 1
     if n > 1:
          UpperCamelCase__										=      n
     return int(A							)


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



