参考代码:
#include<iostream> #include<string> using namespace std; int main() { int n; string s; string s0; cin >> n; s = "A"; for (int i = 1;i <= 26;i++) { if (n == i) { cout << s << endl; break; } s0 = s; s += 'A' + i; s += s0; } return 0; }
0.0分
0 人评分