Run ID:101692
提交时间:2024-12-15 19:21:22
#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; } }