Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
68134 | 杨竣周 | 放大的X | C++ | 通过 | 100 | 9 MS | 252 KB | 380 | 2023-02-02 15:56:54 |
#include <bits/stdc++.h> using namespace std; int n,t; void s(int t){ for(int i=1;i<=t;i++){ for(int j=1;j<=t;j++){ if(i==j||i==t-j+1) cout<<"X"; else cout<<" "; } cout<<endl; } } int main(){ cin>>n; for(int i=1;i<=n;i++){ cin>>t; s(t); cout<<endl; } return 0; }