1 solutions

  • 1
    @ 2025-5-18 15:48:50
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n;
        cin>>n;
        for(int i=1;i<=n;i++)
        {
            cout<<"|";
            for(int j=1;j<=n-2;j++)
            {
                if(i==(n+1)/2) cout<<"-";
                else cout<<'a';
            }
            cout<<"|"<<endl;
        }
        return 0;
    }
    
    

    Information

    ID
    2533
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    8
    Tags
    (None)
    # Submissions
    15
    Accepted
    6
    Uploaded By