Run ID:109237

提交时间:2025-02-07 11:29:00

#include <bits/stdc++.h> using namespace std; int main() { /**int a[3][3]; //行 for(int i=0;i<3;i++){ for(int j=0;j<3;j++){//行-下标为0开始(0,1,2) cin>>a[i][j]; } for(int l=0;l<=3;l++){ for(int x=0;x<3;x++){ cout<<a[i][j]; } } } }**/ int a[100][100],b[100][100]; 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 x=0;x<n;x++){ for(int z=0;z<m;z++){ cin>>b[x][z]; } } for(int k=0;k<n;k++){ for(int l=0;l<m;l++){ cout<<b[k][l]+a[k][l]<<" "; } cout<<endl; } return 0; }