#思路就是26進制轉10進制,這樣一說是不是感覺很簡單了呢?
class Solution(object):
def titleToNumber(self, s):
"""
:type s: str
:rtype: int
"""
base=ord("A")-1
count=0
for S in s:
count*=26
count+=ord(S)-base
return count