




'''simple docstring'''





from collections.abc import Sequence


def 					UpperCamelCase_(     snake_case							:	int							,    snake_case							:	str = False					):

							'''simple docstring'''






							if not arr:
														return 0

							snake_case_      =				0 if allow_empty_subarrays else float("-inf"					)
							snake_case_      =				0.0
							for num in arr:
														snake_case_      =				max(0 if allow_empty_subarrays else num							,    curr_sum + num					)
														snake_case_      =				max(A_							,    A_					)

							return max_sum


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

	testmod()

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










'''simple docstring'''





def 					UpperCamelCase_(     snake_case							:	int = 1_0_0_0					):

							'''simple docstring'''






							snake_case_      =				3
							snake_case_      =				0
							while a < n:
														if a % 3 == 0 or a % 5 == 0:
																					result += a
														elif a % 1_5 == 0:
																					result -= a
														a += 1
							return result


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




