6 条题解

  • 0
    @ 2022-7-19 19:48:24
    using namespace std;
    int main(){
    	int m=0,n,g=0;
    	char a,b;
    	cin>>a;
    	n=a;
    	for(int i=65;i<=90;i++){
    		m++;
    		for(int j=1;j<=(n-64)-m;j++){
    			cout<<" ";
    		}
    		for(int k=1;k<=2*(i-64)-1;k++){
    			b=i;
    			cout<<b;
    		}
    		if(i==n){
    			break;
    		}
    		cout<<endl;
    	}
    	cout<<endl;
    	for(int d=n-1;d>=65;d--){
    		g++;
    		for(int f=1;f<=g;f++){
    			cout<<" ";
    		}
    		for(int e=1;e<=2*(d-64)-1;e++){
    			b=d;
    			cout<<b;
    		}
    		cout<<endl;
    	}
    		
    	
    	return 0;
    }
    

    信息

    ID
    76
    时间
    1000ms
    内存
    128MiB
    难度
    4
    标签
    递交数
    428
    已通过
    211
    上传者