EasyRating 1000
Best Window of K
Print the maximum sum of k consecutive elements.
Input
n k, then n integers.
Output
A number.
Sample 1
Input
5 2 1 4 2 10 2
Output
12
Sample 2
Input
1 1 -3
Output
-3
Output appears heren k, then n integers.
A number.
5 2 1 4 2 10 2
12
1 1 -3
-3
Output appears here