

from __future__ import annotations





def a(lowercase__      ,			lowercase__						):





	'''simple docstring'''
	if len(lowercase__						) < k or k < 0:
		raise ValueError('Invalid Input'						)
	snake_case_   		=			snake_case_   		=			sum(array[:k]						)
	for i in range(len(lowercase__						) - k						):
		snake_case_   		=			current_sum - array[i] + array[i + k]
		snake_case_   		=			max(lowercase__      ,			lowercase__						)
	return max_sum


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

		testmod()
		A									=  [randint(-1000, 1000) for i in range(100)]
		A									=  randint(0, 110)
		print(f"""The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}""")



import unittest

from accelerate import debug_launcher
from accelerate.test_utils import require_cpu, test_ops, test_script


@require_cpu
class SCREAMING_SNAKE_CASE	(		unittest.TestCase				):






			"""simple docstring"""




			def       __lowerCAmelCase			(     self				):

				"""simple docstring"""


				debug_launcher(test_script.main				)







			def       __lowerCAmelCase			(     self				):

				"""simple docstring"""


				debug_launcher(test_ops.main				)
