Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
2889 邓程允 矩阵加法 C++ Accepted 2 MS 336 KB 470 2024-03-09 16:27:17

Tests(10/10):


Code:

# include<iostream> using namespace std; int main(){ int a,b,c[101][101],d[101][101]; cin>>a>>b; for(int i=0;i<a;i++){ for(int j=0;j<b;j++){ cin>>c[i][j]; } } for(int i=0;i<a;i++){ for(int j=0;j<b;j++){ cin>>d[i][j]; } } for(int i=0;i<a;i++){ for(int j=0;j<b;j++){ cout<<c[i][j]+d[i][j]<<" "; } cout<<endl; } return 0; }