Run ID:85933

提交时间:2024-07-21 10:40:48

#include<list> #include<queue> #include<stack> #include<cmath> #include<cstdio> #include<cstring> #include<iomanip> #include <limits> #include<iostream> #include <conio.h> #include<algorithm> #include <windows.h> #include<bits/stdc++.h> using namespace std; int main() { int n; int t; cin>>t; for (int j = 1; j <= t; j++) { cin >> n; for (int j = 1; j <= n; j++) { for (int i = 1; i <= n; i++) { if (i == j || i == (n + 1) - j) { cout << "X"; } else { cout << " "; } }cout<<endl; }cout<<endl; } }