3 solutions

  • -1
    @ 2024-7-11 15:30:59
    #include<bits/stdc++.h>
    using namespace std;
    int main()
    {
    	int n;
    	cin>>n;
    	for(int i=1;i<=n;i++)
    	{
    		for(int j=1;j<=n-i;j++)
    		{
    			cout<<" ";
    		}
    		char ch='A'+i-1;
    		for(char c=ch;c>='A';c--)
    		{
    			cout<<c;
    		}
    		for(char c='B';c<=ch;c++)
    		{
    			cout<<c;
    		}
    		cout<<endl;
    	}
    	return 0;
    }
    
    • -2
      @ 2025-6-7 10:21:34

      #include<bits/stdc++.h> using namespace std; int main() { int n; cin>>n; for(int i=1;i<=n;i++) { for(int j=1;j<=n-i;j++) { cout<<" "; } char ch='A'+i-1; for(char c=ch;c>='A';c--) { cout<<c; } for(char c='B';c<=ch;c++) { cout<<c; } cout<<endl; } return 0; }

      • -8
        @ 2024-11-30 11:45:53

        fdidfgfnb vfddfbmsfkfnjb dfl vkdasnk fmbvjlksdbjvkbnsdfgfjheauahgbvuaefghbauuhdfjbgufuhidsrehtbjyeuisebbewjh2weuurdvjsgrbrhewyusdiyfd

        • 1

        Information

        ID
        65
        Time
        1000ms
        Memory
        256MiB
        Difficulty
        1
        Tags
        (None)
        # Submissions
        148
        Accepted
        64
        Uploaded By