题目
Given a column title as appear in an Excel sheet, return its corresponding column number.
For example:
1 | A -> 1 |
Example 1:
1 | Input: "A" |
Example 2:
1 | Input: "AB" |
Example 3:
1 | Input: "ZY" |
Constraints:
1 <= s.length <= 7
s
consists only of uppercase English letters.s
is between “A” and “FXSHRXW”.
思路
Easy.
代码
1 | class Solution(object): |