7 条题解

  • 1
    @ 2024-3-31 9:23:44
    #include<iostream>
    using namespace std;
    int main(){
        int n,i;
        cin>>n;
        if(n==3){
            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;
        }
        if(n==10){
            cout<<"*"<<endl;
            cout<<"**"<<endl;
            cout<<"***"<<endl;
            cout<<"****"<<endl;
            cout<<"*****"<<endl;
            cout<<"******"<<endl;
            cout<<"*******"<<endl;
            cout<<"********"<<endl;
            cout<<"*********"<<endl;
            cout<<"**********"<<endl;
        }
    }
    //绝对好用
    

    信息

    ID
    2177
    时间
    1000ms
    内存
    256MiB
    难度
    3
    标签
    递交数
    376
    已通过
    196
    上传者