Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
68134 | 杨竣周 | 放大的X | C++ | Accepted | 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; }