Run ID 作者 问题 语言 测评结果 Time Memory 代码长度 提交时间
158605 罗嘉睿 放大的X C++ Accepted 63 MS 268 KB 484 2026-08-22 15:31:47

Tests(1/1):


Code:

#include <iostream> using namespace std; int main() { int T; if(!(cin>>T)) return 0; while(T--) { int n; cin>>n; for(int i=0;i<n;i++) { for(int j=0;j<n;j++) { if(j==i||j==n-1-i) { cout<<"X"; } else { cout<<" "; } } cout<<endl; } cout<<endl; } return 0; }