


'''simple docstring'''

from __future__ import annotations





def lowerCamelCase     (     lowerCAmelCase							:      list[int]						,						lowerCAmelCase							:      int						):





	"""simple docstring"""







	if len(_UpperCAmelCase						) < k or k < 0:
		raise ValueError('Invalid Input'						)
	__magic_name__			:       Any	      =	sum(array[:k]						)
	for i in range(len(_UpperCAmelCase						) - k						):
		__magic_name__			:       Tuple	      =	current_sum - array[i] + array[i + k]
		__magic_name__			:       Tuple	      =	max(_UpperCAmelCase						,						_UpperCAmelCase						)
	return max_sum


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

							testmod()
							lowerCAmelCase :Union[str, Any]             =     [randint(-1_0_0_0, 1_0_0_0) for i in range(1_0_0)]
							lowerCAmelCase :Optional[int]             =     randint(0, 1_1_0)
							print(F'The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}')






import enum
import shutil
import sys


a__   ,				a__      :     int         =		shutil.get_terminal_size()

a__      :     Tuple         =		{'UP': 'A', 'DOWN': 'B', 'RIGHT': 'C', 'LEFT': 'D'}





class UpperCAmelCase_				( enum.Enum ):
  __lowerCAmelCase   :						int							=   0
  __lowerCAmelCase   :						Optional[int]							=   1




def      UpperCAmelCase_    (    _UpperCAmelCase							:Optional[int]  ,						_UpperCAmelCase							:int=""				)	->				str:
     '''simple docstring'''


     sys.stdout.write(str(_UpperCAmelCase				) + end				)
     sys.stdout.flush()

def      UpperCAmelCase_    (    _UpperCAmelCase							:Union[str, Any]  ,						_UpperCAmelCase							:Tuple  ,						_UpperCAmelCase							:Tuple=""				)	->				List[Any]:
     '''simple docstring'''


     forceWrite(f'\u001b[{color}m{content}\u001b[0m'  ,						_UpperCAmelCase				)

def      UpperCAmelCase_    (    )	->				Dict:
     '''simple docstring'''


     forceWrite('''\r'''				)

def      UpperCAmelCase_    (    _UpperCAmelCase							:int  ,						_UpperCAmelCase							:str				)	->				List[Any]:
     '''simple docstring'''


     forceWrite(f'\033[{num_lines}{CURSOR_TO_CHAR[direction.upper()]}'				)

def      UpperCAmelCase_    (    )	->				List[Any]:
     '''simple docstring'''


     forceWrite(''' ''' * TERMINAL_WIDTH				)
     reset_cursor()


def      UpperCAmelCase_    (    )	->				Tuple:
     '''simple docstring'''


     reset_cursor()
     forceWrite('''-''' * TERMINAL_WIDTH				)



