9 条题解

  • 2
    @ 2025-3-30 11:24:52
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        char n;cin>>n;
        cout<<"  "<<n<<endl<<" "<<n<<n<<n<<endl<<n<<n<<n<<n<<n;
        return 0;
    }
    
    

    暴力输出

    • 1
      @ 2025-3-30 19:57:18

      仅供参考

      #include <bits/stdc++.h>   
      using namespace std;
      string s1,s2;
      int main() {
          char a;
          cin>>a;
          cout<<"  "<<a<<"\n";
          cout<<" "<<a<<a<<a<<"\n";
          cout<<a<<a<<a<<a<<a;
      	return 0;
      }
      
      • 1
        @ 2025-1-28 20:19:15

        两种解法,cstdiostd

        #include <cstdio>
        int main() {
            char ch;
            scanf("%s", &ch);
            printf("  %s  \n %s%s%s \n%s%s%s%s%s\n", &ch, &ch, &ch, &ch, &ch, &ch, &ch, &ch, &ch);
            return 0;
        }
        
        #include <bits/stdc++.h>
        using namespace std;
        int main() {
            char ch;
            cin >> ch;
            cout << "  " << ch << "  " << endl;
            cout << " " << ch << ch << ch << " " << endl;
            cout << ch << ch << ch << ch << ch << endl;
            return 0;
        }
        
        • 0
          @ 2025-10-26 10:32:15

          #include<bits/stdc++.h> using namespace std; int main() { char n;cin>>n; cout<<" "<<n<<endl<<" "<<n<<n<<n<<endl<<n<<n<<n<<n<<n; return 0; }

          • 0
            @ 2025-5-30 13:16:00

            #include <stdio.h>

            int main() { char c; scanf("%c", &c); printf(" %c\n", c); printf(" %c%c%c\n", c, c, c); printf("%c%c%c%c%c\n", c, c, c, c, c);

            return 0;
            

            }

            • -1
              @ 2024-11-16 21:57:37

              显而易见,结果就是输出第一行 11 个字符,第二行 33 个字符,第三行 55 个字符。

              #include<iostream>
              using namespace std;
              int main(){
              	char ch;
              	cin>>ch;
              	cout<<"  "<<ch<<endl<<" ";
              	cout<<ch<<ch<<ch<<endl;
              	cout<<ch<<ch<<ch<<ch<<ch;
              }
              
              
              • -2
                @ 2024-12-5 16:08:18
                s = input()
                print("  " + s)
                print(" " + s * 3)
                print(s * 5)
                
                • -2
                  @ 2024-11-19 20:01:49

                  #include using namespace std; int main(){ char ch; cin>>ch; cout<<" "<<ch<<endl; cout<<" "<<ch<<ch<<ch<<endl; cout<<ch<<ch<<ch<<ch<<ch; }

                  • -3
                    @ 2024-12-5 20:59:45

                    #include<bits/stdc++.h> using namespace std; int main(){ char a,b,c; cin>>a; cout<<" "<<a<<" "<<endl; cout<<" "<<a<<a<<a<<" "<<endl; cout<<a<<a<<a<<a<<a; return 0; } //最简单的办法

                    • 1

                    信息

                    ID
                    4455
                    时间
                    1000ms
                    内存
                    128MiB
                    难度
                    1
                    标签
                    (无)
                    递交数
                    775
                    已通过
                    418
                    上传者