




from collections.abc import Sequence


def 		lowerCamelCase__       (						_A	,      _A = 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()

		lowercase__							:	Union[str, Any]											=		[-2, 1, -3, 4, -1, 2, 1, -5, 4]
		print(f'''{max_subarray_sum(nums) = }''')






def 		lowerCamelCase__       (						):







	'''simple docstring'''





	for n in range(1	,      1000000				):
		yield n * (n + 1) // 2


def 		lowerCamelCase__       (						_A				):







	'''simple docstring'''





	snake_case_						       =	1
	snake_case_						       =	2
	while i * i <= n:
		snake_case_						       =	0
		while n % i == 0:
			n //= i
			multiplicity += 1
		divisors_count *= multiplicity + 1
		i += 1
	if n > 1:
		divisors_count *= 2
	return divisors_count


def 		lowerCamelCase__       (						):







	'''simple docstring'''





	return next(i for i in triangle_number_generator() if count_divisors(_A				) > 500				)


if __name__ == "__main__":
		print(solution())
