fork download
  1. N, M = map(int, input().split())
  2.  
  3. list_a = []
  4. list_b = []
  5. list_c = []
  6.  
  7. for i in range(N):
  8. list_a = list(map(int, input().split()))
  9. list_b.append(list_a)
  10. for i in range(M):
  11. list_c = list(map(int, input().split()))
  12. for j in range(N):
  13. print(list_b[i][j]+list_c[j], end=' ')
  14. print()
  15.  
Success #stdin #stdout 0.03s 9788KB
stdin
3 3
1 1 1
2 2 2
0 1 0
3 3 3
4 4 4
5 5 100
stdout
4 4 4 
6 6 6 
5 6 100