解题思路:
注意事项:
参考代码:
#include
using namespace std;
int n;
int main()
{
cin >> n;
vector
int p = 0;
while (n > 0) {
int offset = n % 26;
if (offset == 0) {
res[p] = 'Z';
n -= 26;
} else {
res[p] = (char)('A' + offset - 1);
}
n /= 26;
p++;
}
for (int i = p - 1; i >= 0; i--) {
cout << res[i];
}
cout << endl;
return 0;
}
0.0分
0 人评分