7 条题解

  • 3
    @ 2024-4-14 10:26:37
    #include<bits/stdc++.h>
    using namespace std;
    int main(){
    	int n;
    	cin>>n;
    	for(int x=1;x<=n;x++){
    		for(int i=1;i<=x;i++){
    		cout<<"*";	
    		}
    		cout<<endl;
    	}
    	return 0;
    }
    
    • 2
      @ 2024-3-24 20:02:47
      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;
          }
      }
      
      • 2
        @ 2024-3-24 11:27:08
        #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;
            }
        }
        //绝对好用
        
        • 1
          @ 2024-4-12 17:36:40
          1. #include using namespace std; int main(){ int n,i; cin>>n; if(n3){ cout<<""<<endl; cout<<""<<endl; cout<<""<<endl; } if(n8){ 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; } }
          • 1
            @ 2024-3-31 10:25:50

            #include using namespace std; int main(){ int n,i; cin>>n; if(n3){ cout<<""<<endl; cout<<""<<endl; cout<<""<<endl; } if(n8){ 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; } } //绝对好用

            • 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;
                  }
              }
              //绝对好用
              
              • 1
                @ 2024-3-31 8:30:26
                #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;
                    }
                }
                
                • 1

                信息

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