#B4252. Dot Product of Two Vectors
Dot Product of Two Vectors
Dot Product of Two Vectors
Given two vectors of length , compute their dot product. For vectors and , the dot product is defined as $$a_1b_1 + a_2b_2 + \cdots + a_nb_n.$$
Calculate the sum of the products of corresponding elements of the two vectors.
inputFormat
The first line contains an integer denoting the length of the vectors.
The second line contains integers representing the vector .
The third line contains integers representing the vector .
outputFormat
Output a single integer — the dot product of the given two vectors.
sample
3
1 2 3
4 5 6
32