Run ID:63629
提交时间:2024-01-19 13:55:28
#include<bits/stdc++.h> using namespace std; int A[100][100],B[100][100],C[100][100]; 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++){ C[i][j]=A[i][j]+B[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<m;j++){ cout<<C[i][j]<<" "; } cout<<endl; } return 0; }