Sum of matrices

Coding Medium 70 points 0 solves

Connect to the TCP Judge

Run your solver locally and connect to the judge. For each test case, send the correct output. When you clear every case, the judge prints the flag.

Host
5.189.172.8
Port
10006

Sample Test Cases

Input
1 1
1
2
Output
3
Input
1 2
1 2
3 4
Output
4 6

The judge cycles through these cases (and any others configured). Return the exact output for each to earn the flag.

Problem Description

You are given two matrices A and B, your task is to calculate the sum of matrices A and B.
INPUT: the first line contains two numbers N (1≤N≤1000) and M (1≤M≤1000), which are the dimensions of matrices A and B.
Then, in N lines, M numbers are given, the values ​​of matrix A.
Then in N lines, M numbers are given, the values ​​of matrix B.
Print the matrix (A+B).

Login to submit a solution.

Frequently Asked Questions

This is a medium level problem worth 70 points.

This is a coding problem problem in the Coding category.

0 users have successfully solved this problem.

Related Problems

Try these similar problems to improve your skills