9 solutions

  • 8
    @ 2024-4-5 15:03:44
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int a,b;
    	char c;
    	bool d;
    	cin>>a>>b>>c>>d;
    	if(d==1)
    	{
    		for(int i=1;i<=a;i++)
    		{
    			for(int j=1;j<=b;j++)
    			{
    				cout<<c;
    			}
    			cout<<endl;
    		}
    	}
    	if(d==0)
    	{
    		for(int i=1;i<=a;i++)
    		{
    			for(int j=1;j<=b;j++)
    			{
    				if(i==1||i==a||j==1||j==b) //边缘判断 
    				{	
    					cout<<c;
    				}
    				else
    				{
    					cout<<" ";
    				}
    			}
    			cout<<endl;
    		}
    	}
    	return 0;
    }
    
    • @ 2024-11-4 19:17:16

      才一级,还超级管理员。那我是不是就是超级管理员了?季总。

    • @ 2024-11-4 19:20:04

      说错了,是最强管理员!

    • @ 2024-11-4 19:36:33
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
          int n,a;
          char b;
          bool c;
          cin>>n>>a>>b>>c;
          if( c == 1)
          {
              for(int i = 1;i <= n;i++)
              {
                  for(int j = 1;j <= a;j++)
                  {
                      cout<<b;
                  }
                  cout<<endl;
      
              }
          }
          if(c == 0)
          {
              for(int i = 1;i <= n;i++)
              {
                  for(int j = 1;j <= a;j++)
                  {
                      if(i == n || i == 1 || j == a || j == 1)
                      {
                          cout<<b;
                      }
                      else
                      {
                          cout<<" ";
                      }
          
                  }
                  cout<<endl;
              }
          }
          return 0;
      }
      
    • @ 2024-11-4 19:37:18

      不是哥,这不有手就行吗?

  • -1
    @ 2024-11-4 19:36:09
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
        int n,a;
        char b;
        bool c;
        cin>>n>>a>>b>>c;
        if( c == 1)
        {
            for(int i = 1;i <= n;i++)
            {
                for(int j = 1;j <= a;j++)
                {
                    cout<<b;
                }
                cout<<endl;
    
            }
        }
        if(c == 0)
        {
            for(int i = 1;i <= n;i++)
            {
                for(int j = 1;j <= a;j++)
                {
                    if(i == n || i == 1 || j == a || j == 1)
                    {
                        cout<<b;
                    }
                    else
                    {
                        cout<<" ";
                    }
        
                }
                cout<<endl;
            }
        }
        return 0;
    }
    
    • -2
      @ 2024-5-25 11:05:35
      #include<bits/stdc++.h>
      using namespace std;
      int main()
      {
      	int a,b;
      	char c;
      	bool d;
      	cin>>a>>b>>c>>d;
      	if(d==1)
      	{
      		for(int i=1;i<=a;i++)
      		{
      			for(int j=1;j<=b;j++)
      			{
      				cout<<c;
      			}
      			cout<<endl;
      		}
      	}
      	if(d==0)
      	{
      		for(int i=1;i<=a;i++)
      		{
      			for(int j=1;j<=b;j++)
      			{
      				if(i==1||i==a||j==1||j==b)
      				{
      					cout<<c;
      				}
      				else 
      				{
      					cout<<" ";
      				}
      			}
      			cout<<endl;
      		}
      	}
          return 0;
      }
      
      • -3
        @ 2024-7-9 10:06:19
        #include<bits/stdc++.h>
        using namespace std;
        int main()
        {
            int a,b,t;
            char n; 
            cin>>a>>b>>n>>t;
            if(t==1)
            {
                for(int i=1;i<=a;i++)
                {
                    for(int j=1;j<=b;j++)
                    {
                        cout<<n;
                    }
                    cout<<endl;
                }
            }
            else if(t==0)
            {
                for(int i=1;i<=a;i++)
                {
                    if(i==1)
                    {
                        for(int j=1;j<=b;j++)
                        {
                            cout<<n;
                        }
                    }
                    else if(i>1 && i<a)
                    {
                        cout<<n;
                        for(int j=1;j<+b-1;j++)
                        {
                            cout<<" ";
                        }
                        cout<<n;
                    }
                    else if(i==a)
                    {
                        for(int j=1;j<=b;j++)
                        {
                            cout<<n;
                        }
                    }
                    cout<<endl;
                }
            }
            return 0;
        }
        
        • -3
          @ 2024-6-14 20:22:38

          #include<bits/stdc++.h> using namespace std; int main() { int n,m,g; char v; cin>>n>>m>>v>>g; if(g0) { for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { if(in||i1||jm||j==1) { cout<<v; } else { cout<<" ";

          }	
          		}
          		cout<<endl;
          	}
          }
          else if(g==1)
          {
          	for(int i=1;i<=n;i++)
          	{
              	for(int j=1;j<=m;j++)
              	{
                 		cout<<v;
              	}
              	cout<<endl;
          	}
          }
          
          
          
          return 0;
          

          }

          • -3
            @ 2024-6-14 20:20:22

            #include<bits/stdc++.h> using namespace std; int main() { int n,m,g; char v; cin>>n>>m>>v>>g; if(g0) { for(int i=1;i<=n;i++) { for(int j=1;j<=m;j++) { if(in||i1||jm||j==1) { cout<<v; } else { cout<<" ";

            }	
            		}
            		cout<<endl;
            	}
            }
            else if(g==1)
            {
            	for(int i=1;i<=n;i++)
            	{
                	for(int j=1;j<=m;j++)
                	{
                   		cout<<v;
                	}
                	cout<<endl;
            	}
            }
            
            
            
            return 0;
            

            }

            • -3
              @ 2024-6-14 19:57:47
              #include<bits/stdc++.h>
              using namespace std;
              int main()
              {
              	int a,b;
              	char c;
              	bool d;
              	cin>>a>>b>>c>>d;
              	if(d==1)
              	{
              		for(int i=1;i<=a;i++)
              		{
              			for(int j=1;j<=b;j++)
              			{
              				cout<<c;
              			}
              			cout<<endl;
              		}
              	}
              	if(d==0)
              	{
              		for(int i=1;i<=a;i++)
              		{
              			for(int j=1;j<=b;j++)
              			{
              				if(i==1||i==a||j==1||j==b) //边缘判断 
              				{	
              					cout<<c;
              				}
              				else
              				{
              					cout<<" ";
              				}
              			}
              			cout<<endl;
              		}
              	}
              	return 0;
              }
              
              • -4
                @ 2024-10-26 9:15:38

                不会做不要看题解

                • -4
                  @ 2024-10-26 9:13:01

                  不会做不要看题解

                  • @ 2024-11-4 19:15:43

                    你个二级的别猪叫了!

                • 1

                Information

                ID
                885
                Time
                1000ms
                Memory
                256MiB
                Difficulty
                1
                Tags
                (None)
                # Submissions
                149
                Accepted
                60
                Uploaded By