155. Excel Column Number
EasyNumber Bases
Convert a spreadsheet column title (A, B, …, Z, AA, …) to its number.
Input format
A single uppercase title.
Output format
The column number.
Example 1
Input
A
Output
1
Example 2
Input
AB
Output
28
Constraints
1 ≤ length ≤ 7
Read input from standard input and print the answer to standard output. Your code is judged against 4 test cases, most of them hidden.
Loading the MyLoginn IDE…