Dot Product

Dot Product

Easy Computer Mathematics Linear Algebra Basics 25 views
Explanation Complexity

Problem Statement

Compute dot product of two vectors.

Input Format

n then vector A then vector B.

Output Format

One integer.

Example

3
1 2 3
4 5 6
32

Constraints

n

Input / Output Format

Input Format
n then vector A then vector B.
Output Format
One integer.
Constraints
n

Examples

Input:
3 1 2 3 4 5 6
Output:
32

Example Solution (Public)

Computer Mathematics
Compute sum ai*bi.

Official Solution Code

Compute sum ai*bi.
Please login to submit solutions.
Editor
Output

                                        
Please login to submit solutions.