5 条题解

  • -5
    @ 2024-3-31 9:24:59
    #include<iostream>
    using namespace std;
    int main(){
        int n,i;
        cin>>n;
        if(n==3){
            cout<<"***"<<endl;
            cout<<"**"<<endl;
            cout<<"*"<<endl;
        }
        if(n==5){
            cout<<"*****"<<endl;
            cout<<"****"<<endl;
            cout<<"***"<<endl;
            cout<<"**"<<endl;
            cout<<"*"<<endl;
        }
        if(n==8){
            cout<<"********"<<endl;
            cout<<"*******"<<endl;
            cout<<"******"<<endl;
            cout<<"*****"<<endl;
            cout<<"****"<<endl;
            cout<<"***"<<endl;
            cout<<"**"<<endl;
            cout<<"*"<<endl;
    
        }
    }
    

    信息

    ID
    2189
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    (无)
    递交数
    281
    已通过
    164
    上传者