1 solutions

  • 1
    @ 2025-5-18 14:40:05
    #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;j++)
            {
                if(i==j||n+1==i+j) cout<<"+";
                else cout<<"-";
            }
            cout<<endl;
        }
        return 0;
    }
    
    

    le si yao xing bu xing ya

    • 1

    Information

    ID
    1177
    Time
    1000ms
    Memory
    256MiB
    Difficulty
    9
    Tags
    (None)
    # Submissions
    10
    Accepted
    7
    Uploaded By