class Solution:
    # @param {string} s
    # @return {integer}
    def titleToNumber(self, s):
        ans = 0
        s_len = len(s)
        for i in range(s_len):
            ans = (ord(s[i]) - 64) * 26 ** (s_len - i - 1) + ans
        return ans
5b462a42d1818887fd82c9d2714da7cddada402f
<mask token>

class Solution:
    <mask token>

class Solution:

    def titleToNumber(self, s):
        ans = 0
        s_len = len(s)
        for i in range(s_len):
            ans = (ord(s[i]) - 64) * 26 ** (s_len - i - 1) + ans
        return ans

class Solution:
    # @param {string} s
    # @return {integer}
    def titleToNumber(self, s):
        ans = 0
        s_len = len(s)
        for i in range(s_len):
            ans = (ord(s[i]) - 64) * 26 ** (s_len - i - 1) + ans
        return ans