Excel Sheet Column Number
Easy
Strings
String
Math
Given a column title (A=1, B=2, ..., Z=26, AA=27), return the corresponding number.
Constraints
1 ≤ length ≤ 7
Examples
Example 1:
Input: A
Output: 1
Example 2:
Input: AB
Output: 28
Example 3:
Input: ZY
Output: 701
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console