标签:etc turn tle code class let return problems href
class Solution {
public:
int titleToNumber(string s) {
int ans=0;
for(int i=0;i<s.length();i++)
{
ans*=26;
ans+=s[i]-'A'+1;
}
return ans;
}
};
LeetCode 171. Excel Sheet Column Number
标签:etc turn tle code class let return problems href
原文地址:https://www.cnblogs.com/dacc123/p/12236094.html