






"""simple docstring"""

import os  # noqa: this is just for tests
import os as renamed_os  # noqa: this is just for tests
from os import path  # noqa: this is just for tests
from os import path as renamed_path  # noqa: this is just for tests
from os.path import join  # noqa: this is just for tests
from os.path import join as renamed_join  # noqa: this is just for tests


lowercase__          = open  # noqa: we just need to have a builtin inside this module to test it properly







"""simple docstring"""




from __future__ import annotations






def       _SCREAMING_SNAKE_CASE		(	_lowercase						:    list[int]    ,       _lowercase						:    int					) ->int:






	'''simple docstring'''






	if len(_lowercase					) < k or k < 0:
		raise ValueError("Invalid Input"					)
	a      :		Optional[Any]	=				sum(array[:k]					)
	for i in range(len(_lowercase					) - k					):
		a      :		Optional[Any]	=				current_sum - array[i] + array[i + k]
		a      :		Union[str, Any]	=				max(_lowercase    ,       _lowercase					)
	return max_sum


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

		testmod()
		a						: Any     	=			[randint(-1000, 1000) for i in range(100)]
		a						: List[str]     	=			randint(0, 110)
		print(F'''The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}''')


