5 条题解

  • -3
    @ 2024-4-20 11:05:08

    #include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; for(int i=n;i>=1;i--){ for(int x=1;x<=i;x++){ if(x1||xn||x==i){ cout<<""; }else{ cout<<""; } } cout<<endl; } return 0; }

    • -3
      @ 2024-3-30 19:57:50
      #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;
      
          }
      }
      
      • -4
        @ 2024-3-31 10:39:23

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

        }
        

        }

        • -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;
          
              }
          }
          
          • -5
            @ 2024-3-31 8:29:19
            #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;
            
                }
            }
            
            • 1

            信息

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