Leetcode 171. Excel Sheet Column Number
題目的意思是給定一個Excel表格的列標題,求是第幾列。
思路:這題實際上是求如何將26位進位制數轉化為10進位制數。
class Solution {
public:
int titleToNumber(string s) {
int re=0;
for(char x:s)
re=re*26+(x-'A'+1);
return re;
}
};
相關文章
- 171. Excel Sheet Column Number--LeetCode RecordExcelLeetCode
- [LeetCode] Excel Sheet Column NumberLeetCodeExcel
- leetcode刷題--Excel Sheet Column NumberLeetCodeExcel
- Excel Sheet Column Number Excel表列序號Excel
- leetcode刷題--Excel Sheet Column TitleLeetCodeExcel
- Leetcode 168. Excel Sheet Column TitleLeetCodeExcel
- Leetcode168. Excel Sheet Column TitleLeetCodeExcel
- Excel Sheet Column Title Excel表列名稱Excel
- leetcode:171. Excel表列序號LeetCodeExcel
- excel合併sheetExcel
- 用Pandas讀寫Excel檔案-輸出單sheet和多sheetExcel
- Leetcode Number of islandsLeetCode
- LeetCode:Largest NumberLeetCode
- [LeetCode] Third Maximum NumberLeetCode
- [LeetCode] Find the Duplicate NumberLeetCode
- LeetCode-Strobogrammatic NumberLeetCode
- LeetCode-Largest NumberLeetCode
- LeetCode-Number of IslandsLeetCode
- Leetcode Valid NumberLeetCode
- leetcode Palindrome NumberLeetCode
- Leetcode Single NumberLeetCode
- fortune-sheet: 功能豐富的ReactJS線上Excel庫ReactJSExcel
- Leetcode 447 Number of BoomerangsLeetCodeOOM
- Leetcode 9 Palindrome NumberLeetCode
- LeetCode-Additive NumberLeetCode
- LeetCode-Strobogrammatic Number IILeetCode
- LeetCode-Super Ugly NumberLeetCode
- LeetCode-Find the Duplicate NumberLeetCode
- LeetCode-Create Maximum NumberLeetCode
- LeetCode-Number of Islands IILeetCode
- Leetcode-Single NumberLeetCode
- Leetcode-Valid NumberLeetCode
- Palindrome Number leetcode javaLeetCodeJava
- Valid Number leetcode javaLeetCodeJava
- Single Number leetcode javaLeetCodeJava
- 多個報表匯出到一個 excel 的多 sheet 頁Excel
- Python合併多個Excel檔案中的指定sheetPythonExcel
- 【xiaomi】ASP.NET 分Sheet匯出EXCEL 2003ASP.NETExcel