std

07yintaobo 2023-01-28 17:12:23 2 返回题目

#include<bits/stdc++.h>
#define int long long
using namespace std;
char c;
signed main(){
	cin >> c;
	int n = c - 'A' + 1;
	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' + j - 1);
		for (int j = i - 1; j >= 1; j--) cout << (char)('A' + j - 1);
		cout << endl;
	}
	return 0;
}
{{ vote && vote.total.up }}