题目
//像10进制一样进行 转换 只是要从0开始记录
class Solution {
public:
string convertToTitle(int n) {
char a;
string str="";
while(n>){
int tmp = (n-)%;
str = char(tmp+'A') + str;
n = (n-)/;
}
return str;
}
};
171 Excel Sheet Column Number
class Solution {
public:
int titleToNumber(string s) {
int n = s.size();
int sum = ;
for(int i = ; i<n; i++){
int tmp = s[i]-'A' + ;
sum = sum * + tmp;
}
return sum;
}
};