Run ID | Author | Problem | Lang | Verdict | Score | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|---|
68142 | 张志鹏 | 放大的X | C++ | Presentation Error | 0 | 10 MS | 264 KB | 566 | 2023-02-02 16:04:07 |
#include<bits/stdc++.h> using namespace std; int n,f1,f2; int main(){ cin>>n; for(int i=1;i<=n;i++){ int w; cin>>w; f2=w-2; for(int j=1;j<=w/2+1;j++){ for(int z=1;z<=f1;z++) cout<<" "; f1++; cout<<"X"; for(int z=1;z<=f2;z++) cout<<" "; f2=f2-2; if(f2>-3) cout<<"X"; cout<<endl; } f1=w/2-1; f2=1; for(int j=1;j<=w/2;j++){ for(int z=1;z<=f1;z++) cout<<" "; cout<<"X"; f1--; for(int z=1;z<=f2;z++) cout<<" "; f2+=2; cout<<"X"; cout<<endl; } cout<<endl; } return 0; }