Problem Description

Read n integers and chunk size k. Write function chunks(arr,k) that prints each chunk sum in new line.

Input Format

Line1: n k. Line2: n integers.

Output Format

Lines of chunk sums.

Sample Test Case

Input:
7 3 1 2 3 4 5 6 7
Output:
6 15 7

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next