171.EXcel表列序号 方法:进制转换 class Solution { public int titleToNumber(String columnTitle) { //进制转换 int number = 0; int mul = 1; for(int i = columnTitle.length()-1;i>=0;i--){ int k = columnTitle.charAt(i) - 'A' + 1; number += mul * k; mul *= 26; } return number; } }