| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 83518 | 游四鑫 | 矩阵对角线 | C++ | Accepted | 8 MS | 656 KB | 675 | 2024-07-14 15:30:05 |
# include<iostream> using namespace std; int a[1000][1000]; int main(){ int n,s,m=0; cin>>n>>s; for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ cin>>a[i][j]; } } for(int i=0;i<n;i++){ for(int j=0;j<n;j++){ if(i==j||i==n-j-1||j==n-i-1)a[i][j]=a[i][j]+s; printf("%5d",a[i][j]); } cout<<endl; } return 0; }