提交时间:2026-06-17 19:35:25

运行 ID: 91852

#include <bits/stdc++.h> using namespace std ; const int N = 30 ; int n ; string s[N] ; string a[] = {"","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z"} ; int main() { cin >> n ; s[1] = "A" ; for(int i = 2 ; i <= n ; i++ ) s[i] = s[i - 1] + a[i] + s[i - 1]; cout << s[n] << endl ; return 0 ; }