




"""simple docstring"""


import unittest

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






@require_cpu
class 					lowercase(     unittest.TestCase ):







 '''simple docstring'''





 def  UpperCamelCase_   (				self:		Any		):




   '''simple docstring'''



   debug_launcher(test_script.main		)


 def  UpperCamelCase_   (				self:		List[str]		):




   '''simple docstring'''



   debug_launcher(test_ops.main		)








"""simple docstring"""


from __future__ import annotations


def 					UpperCAmelCase__       (snake_case__							:					list[int]		,   snake_case__							:					int    ):
  """simple docstring"""

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


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

     testmod()
     A_						=				[randint(-10_00, 10_00) for i in range(1_00)]
     A_						=				randint(0, 1_10)
     print(F'''The maximum sum of {k} consecutive elements is {max_sum_in_array(array,k)}''')


