Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
101692 李雨昊 放大的X C++ Accepted 53 MS 272 KB 352 2024-12-15 19:21:22

Tests(1/1):


Code:

#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; } }