Excel column number

Write codeEasy15 minMicrosoft style

Your task

Given an Excel-style column title (a string of uppercase letters A-Z, e.g. 'A', 'Z', 'AA', 'AB', ... 'ZY'), return its corresponding 1-based column number. A=1, Z=26, AA=27, AB=28, and so on. The title has length 1 to 7. This is bijective base-26 (there is no zero digit).

Examples

excel_col_number(s: str) -> int
Example 1
Inputexcel_col_number("A")
Output1