~/algor $ cat problems/matritsa-ikki-matritsa-yigindisi
Sum of two matrices
Easy
1000 ms
128 MB
32%
Two integer matrices $A$ and $B$ of the same size $n \times m$ are given. Find their sum, the matrix $C$:
$$C_{i,j} = A_{i,j} + B_{i,j}$$
Input
The first line contains $n$ and $m$. The next $n$ lines contain the elements of matrix $A$, followed by $n$ more lines with the elements of matrix $B$.
Output
$n$ lines with $m$ space-separated integers each.
Note
$1 \le n, m \le 200$
$-1000 \le A_{i,j}, B_{i,j} \le 1000$
Examples
Input #1
2 3 1 2 3 4 5 6 6 5 4 3 2 1
Output #1
7 7 7 7 7 7
Input #2
1 1 5 -5
Output #2
0