Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|
26811 | 唐心 | 放大的X | C++ | Accepted | 63 MS | 736 KB | 415 | 2022-05-24 17:01:27 |
#include<iostream> using namespace std; int main() { int n,m; cin >> m; for(int i = 1 ;i <= m;i++) { cin >>n; for(int i = 1;i <= n;i++) { for(int j = 1;j <= n;j++) { if(i == j || j == n-i+1) { cout <<"X"; if(j >= n/2+1) break; } else cout <<" "; } cout << endl; } cout <<endl; } return 0; }