Vector Sum
Submit solution
C, C++, Python3
Points:
2
Time limit:
1.0s
Memory limit:
64M
Author:
Problem type
Allowed languages
Professor Cleese wants you to help him develop a vector adder for his linear algebra class. A vector is an one-dimensional array with \(N\) elements \(A=[a_0, a_1, ..., a_{n-1}]\). The sum of two such vectors \(A\) and \(B = [b_0, b_1, ..., b_{n-1}]\) is simply. \([a_0+b_0, a_1+b_1, ..., a_{n-1} + b_{n-1}]\).
Input Specification
The first line will contain a single integer \(N\) (\(1 < N < 1000\)), indicating the size of the vectors.
The second line will contain \(N\) integers, which are the elements of vector A.
The third line will contain \(N\) integers, which are the elements of vector B.
Output Specification
Output a single line with all elements inside the sum vector.
Sample Input
5
1 2 3 4 5
9 5 4 1 6
Sample Output
10 7 7 5 11
Comments