Spreadsheet Column Number
Inverse of column naming: given the name (A = 1, Z = 26, AA = 27, ...), print the column number.
Input: one line with the column name (uppercase).
Output: the column number.
Constraints:
- 1 ≤ length ≤ 9
Sample Tests
Input 1
AB
Output 1
28
Input 2
ZY
Output 2
701
Discussion (opens after you solve — no spoilers before)
No comments yet.