题目
题解
class Solution {
public:
string convertToTitle(int n) {
return (n>26 ? convertToTitle((n-1)/26) : "") + (char)((n-1) % 26 + 'A');
}
};
class Solution {
public:
string convertToTitle(int n) {
return (n>26 ? convertToTitle((n-1)/26) : "") + (char)((n-1) % 26 + 'A');
}
};