Problem Description

Given n numbers and chunk size c. For each chunk, sum numbers in parallel (Promise.all) and add to total. Print final total sum.

Input Format

Line1: n c. Line2: n integers.

Output Format

One integer sum.

Sample Test Case

Input:
8 3 1 2 3 4 5 6 7 8
Output:
36

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next