4 solutions

  • -2
    @ 2025-6-7 10:21:34

    #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int i=1;i<=n;i++) { for(int j=1;j<=n-i;j++) { cout<<" "; } char ch='A'+i-1; for(char c=ch;c>='A';c--) { cout<<c; } for(char c='B';c<=ch;c++) { cout<<c; } cout<<endl; } return 0; }

    Information

    ID
    65
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    1
    Tags
    (None)
    # Submissions
    157
    Accepted
    72
    Uploaded By