Fixed-Size Window Sums


Submit solution

Points: 100
Time limit: 2.0s
Memory limit: 256M

Author:
Problem types

For every contiguous subarray of length \(K\), compute its sum.

Input

The first line contains \(N\) and \(K\). The second line contains \(N\) integers \(A_i\).

The input satisfies:

  • \(1 \le K \le N \le 1000\)
  • \(0 \le A_i \le 1000\)

Output

Print the \(N-K+1\) window sums from left to right, separated by single spaces.

Example

Input
1 1
11
Output
11

Comments

There are no comments at the moment.