Excel Sheet Column Number(leetcode171)

Given a column title as appear in an Excel sheet, return its corresponding column number.java

For example:git

A -> 1
    B -> 2
    C -> 3
    ...
    Z -> 26
    AA -> 27
    AB -> 28 
    ...

Example 1:github

Input: "A"
Output: 1

Example 2:app

Input: "AB"
Output: 28

Example 3:測試

Input: "ZY"
Output: 701

實現:3d

測試:excel

輸出:code

題目地址:https://leetcode.com/problems/excel-sheet-column-number/blog

代碼:https://github.com/woshiyexinjie/leetcode-xin/tree/master/src/main/java/com/helloxin/leetcode/algorithmsleetcode

相關文章
相關標籤/搜索