Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
68147 季洁 放大的X C++ 通过 100 10 MS 256 KB 387 2023-02-02 16:08:41

Tests(1/1):


#include<bits/stdc++.h> using namespace std; int n; int main(){ cin>>n; for(int i=1;i<=n;i++){ int a; cin>>a; for(int j=1;j<=a;j++){ for(int k=1;k<=(j<=a/2?j-1:a-j);k++) cout<<' '; cout<<'X'; if(j==a/2+1){cout<<endl;continue;} else for(int k=1;k<=a-(j<=a/2?j-1:a-j)*2-2;k++) cout<<' '; cout<<'X'; cout<<endl; } cout<<endl; } return 0; }


测评信息: