3 条题解

  • 0
    @ 2022-8-15 15:52:40
    #include<queue>
    #include<math.h>
    #include<stack>
    #include<stdio.h>
    #include<iostream>
    #include<vector>
    #include<iomanip>
    #include<string.h>
    #include<algorithm>
    #include<bits/stdc++.h>
    using namespace std;
    #define LL long long
    const int N=1e6+10;
    const int INF=0x3f3f3f3f;
    int main()
    {
    	int n;
        cin >> n;
        for (int i=1;i<=n;i++)
    	{
            for (int j=1;j<=n-i;j++)
    		{
                cout<<" ";
            }
            for (int j=1;j<=i;j++)
    		{
                cout<<char('A'-1+j);
            }
            for (int j=i-1;j>0;j--)
    		{
            	cout<<char('A'-1+j);
    		}
            cout<<endl;
        }
    	return 0;
    }
    

    信息

    ID
    1511
    时间
    1000ms
    内存
    256MiB
    难度
    7
    标签
    递交数
    182
    已通过
    48
    上传者