2 条题解

  • 0
    @ 2025-1-21 11:30:34
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
        int h,w,x;
        char c;
        cin>>h>>w>>c>>x;
        for(int i=1;i<=h;++i){
            for(int j=1;j<=w;++j){
                if(i==1 || i==h || j==1 || j==w){
                    cout<<c;
                }else{
                    if(x==1){
                        cout<<c;
                    }else{
                        cout<<' ';
                    }
                }
            }
            cout<<endl;
        }
        return 0;
    }
    

    😄 对了

    信息

    ID
    88
    时间
    1000ms
    内存
    128MiB
    难度
    2
    标签
    (无)
    递交数
    66
    已通过
    40
    上传者