Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
47180 | lmz120809 | 【例38.3】 X战警 | C++ | No Test Data | 0 MS | 0 KB | 248 | 2024-05-12 17:56:28 |
#include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int i=1;i<=n;i++){ for(int j=i;j<=n;j++){ if(i==j||i+j==n+1){ cout<<"X"; } else{ cout<<" "; } } cout<<endl; } return 0; }