4 条题解

  • 1
    @ 2026-7-4 11:52:47

    #include <bits/stdc++.h> using namespace std;

    int main() { char a; cin >> a; cout << " " << a << '\n' << " " << a << a << a << '\n' << a << a << a << a << a << '\n' << " " << a << a << a << '\n' << " " << a; return 0; }

    • 0
      @ 2026-3-22 10:45:25

      #include using namespace std;

      int main() { char a; cin >> a; int b = 4; int c = 4; for (int i = 1; i <= 3; i++) { for (int x = 1; x <= 5; x++) { if (i + x >= b && i + x <= c) { cout << a; } else { cout << " "; } } cout << endl; c = c + 2; } int e = 8; int f = 6; for (int n = 4; n <= 5; n++) { for (int y = 1; y <= 5; y++) { if (n + y >= f && n + y <= e) { cout << a; } else { cout << " "; } } cout << endl; f = f + 2; } return 0; }

      • -4
        @ 2026-1-7 13:34:08

        #include <bits/stdc++.h> using namespace std;

        int main() { char a; cin >> a; cout << " " << a << '\n' << " " << a << a << a << '\n' << a << a << a << a << a << '\n' << " " << a << a << a << '\n' << " " << a; return 0; }

        • -4
          @ 2025-10-31 14:31:07
          #include<iostream>
          using namespace std;
          int main(){
              char a;
              cin>>a;
              int b = 4;
              int c = 4;
              for(int i = 1;i<=3;i++){
                  for(int x = 1;x<=5;x++){
                      if(i+x>=b&&i+x<=c){
                          cout<<a;
                      }else{
                          cout<<" ";
                      }
                  }
                  cout<<endl;
                  c = c+2;
              }
              int e = 8;
              int f = 6;
              for(int n = 4;n<=5;n++){
                  for(int y = 1;y<=5;y++){
                      if(n + y >= f && n+y <= e){
                         cout<<a; 
                      }else{
                          cout<<" ";
                      }
                  }
                 cout<<endl;
                  f = f+2; 
              }
              return 0;
          }
          
          • 1

          信息

          ID
          493
          时间
          1000ms
          内存
          128MiB
          难度
          4
          标签
          递交数
          232
          已通过
          115
          上传者