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;
}
};
相關文章
- Excel Sheet Column Number Excel表列序號Excel
- Leetcode 168. Excel Sheet Column TitleLeetCodeExcel
- Excel Sheet Column Title Excel表列名稱Excel
- leetcode:171. Excel表列序號LeetCodeExcel
- Leetcode Number of islandsLeetCode
- 用Pandas讀寫Excel檔案-輸出單sheet和多sheetExcel
- [LeetCode] Third Maximum NumberLeetCode
- [LeetCode] Find the Duplicate NumberLeetCode
- Leetcode 9 Palindrome NumberLeetCode
- Leetcode 447 Number of BoomerangsLeetCodeOOM
- Leetcode 933 Number of Recent CallsLeetCode
- [LeetCode] 9. Palindrome NumberLeetCode
- LeetCode之Fibonacci Number(Kotlin)LeetCodeKotlin
- Leetcode 611 javascript Valid Triangle NumberLeetCodeJavaScript
- LeetCode之Number of Recent Calls(Kotlin)LeetCodeKotlin
- [LeetCode] 248. Strobogrammatic Number IIILeetCode
- [LeetCode] 191. Number of 1 BitsLeetCode
- [LeetCode] 305. Number of Islands IILeetCode
- Leetcode 17 Letter Combinations of a Phone NumberLeetCode
- Leetcode 137. Single Number IILeetCode
- 【Leetcode】1395. Count Number of TeamsLeetCode
- LeetCode Palindrome Number(009)解法總結LeetCode
- Leetcode – 017. Letter Combinations of a Phone NumberLeetCode
- [LeetCode] 3238. Find the Number of Winning PlayersLeetCode
- [LeetCode] 2684. Maximum Number of Moves in a GridLeetCode
- Python合併多個Excel檔案中的指定sheetPythonExcel
- fortune-sheet: 功能豐富的ReactJS線上Excel庫ReactJSExcel
- Leetcode 202 Happy Number Javascript 解決方案LeetCodeAPPJavaScript
- [LeetCode] 2406. Divide Intervals Into Minimum Number of GroupsLeetCodeIDE
- LeetCode - 解題筆記 - 8 - Palindrome NumberLeetCode筆記
- 多個報表匯出到一個 excel 的多 sheet 頁Excel
- web 端如何像 excel 裡的多 sheet 方式呈現資料WebExcel
- 同一excel檔案中不同sheet間alt+tab切換Excel
- LeetCode Letter Combinations of a Phone Number(017)解法總結LeetCode
- Leetcode 之 PHP 解析 (260. Single Number III)LeetCodePHP
- leetcode學習筆記09 palindrome-numberLeetCode筆記
- 高效能javascript開源線上excel:x-sheet初體驗JavaScriptExcel
- LeetCode演算法題-Number of Boomerangs(Java實現)LeetCode演算法OOMJava
- LeetCode65. Valid Number — 判斷合法數字LeetCode