A. 练51.1 向量点积计算

    Type: Default 1000ms 64MiB

练51.1 向量点积计算

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Description

In linear algebra and computational geometry, vector dot product is a very important operation.
Given two nn-dimensional vectors a=(a1,a2,a3,...,an)\vec{a}=(a_1,a_2,a_3,...,a_n) and b=(b1,b2,b3,...,bn)\vec{b}=(b_1,b_2,b_3,...,b_n), calculate their dot product a×b=a1b1+a2b2+a3b3+...+anbn\vec{a}×\vec{b}=a_1b_1+a_2b_2+a_3b_3+...+a_nb_n.

Input Format

The first line contains an integer nn (1n10001≤n≤1000);
The second line contains nn integers;
The third line contains nn integers;
Adjacent integers are separated by a single space. The absolute value of each integer does not exceed 10001000.

Output Format

Output the vector dot product.

Sample

7
7 8 9 4 8 7 8
3 7 4 7 9 9 7
332

20230913C班作业(1)

Not Claimed
Status
Done
Problem
6
Open Since
2025-9-13 0:00
Deadline
2025-9-21 23:59
Extension
24 hour(s)