from __future__ import annotations




def     UpperCamelCase						(	__lowercase						:			list[int]						,__lowercase						:			int     ) ->    int:
		'''simple docstring'''




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


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

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







import math




def     UpperCamelCase						(	__lowercase						:			int = 1_00     ):
		'''simple docstring'''




		A_		:    List[Any]         =				sum(i * i for i in range(1						,n + 1     )     )
		A_		:    int         =				int(math.pow(sum(range(1						,n + 1     )     )						,2     )     )
		return square_of_sum - sum_of_squares


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






