Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
92640 | 任斌 | 矩阵加法 | C++ | Accepted | 6 MS | 348 KB | 402 | 2024-10-06 09:40:27 |
#include<bits/stdc++.h> using namespace std; int main() { int n,m,A[101][101],B[101][101],a[101][101]; cin>>n>>m; for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>A[i][j]; } } for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cin>>B[i][j]; } } for(int i=1;i<=n;i++){ for(int j=1;j<=m;j++){ cout<<A[i][j]+B[i][j]<<" "; } cout<<endl; } return 0; }