Parallel Squares Sum

JavaScript Medium 3 views
Back to Questions

Problem Description

Given n numbers, square each number using async function in parallel (Promise.all). Print sum of squares.

Input Format

Line1: n. Line2: n integers.

Output Format

One integer sum.

Sample Test Case

Input:
4 1 2 3 4
Output:
30

Constraints

1

Solutions (0)

No solutions submitted yet. Be the first!

Discussion (0)

No comments yet. Start the discussion!

Prev Next