提交时间:2023-11-01 20:55:28

运行 ID: 29696

#include <bits/stdc++.h> using namespace std; int a[101][101], b[101][101]; int main(){ int n, m; cin >> n >> m; for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ cin >> a[i][j]; } } for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ cin >> b[i][j]; } } for(int i = 0; i < n; i++){ for(int j = 0; j < m; j++){ cout << a[i][j] + b[i][j] << " "; } cout << endl; } return 0; }