



'''simple docstring'''

from __future__ import annotations







def a_     (    __UpperCAmelCase				,							__UpperCAmelCase					)				->					Dict:





			"""simple docstring"""







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


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

	testmod()
	a							   =				[randint(-1_000, 1_000) 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)}""")






from math import loga





def 						SCREAMING_SNAKE_CASE__     (   __lowerCAmelCase				):
    if a < 0:
        raise ValueError("Input value must be a positive integer"				)
    elif isinstance(__lowerCAmelCase     ,		__lowerCAmelCase				):
        raise TypeError("Input value must be a 'int' type"				)
    return 0 if (a == 0) else int(loga(a & -a				)				)


if __name__ == "__main__":
     import doctest

     doctest.testmod()



