class Solution:
def titleToNumber(self, s):
"""
:type s: str
:rtype: int
"""
num = 0
for i in range(len(s)-1,-1,-1):
num += (ord(s[i]) - 64) * 26**(len(s)-i-1)
return num
171.Excel表序列号(通过)Python
猜你喜欢
转载自blog.csdn.net/Mryang2333/article/details/86671889
今日推荐
周排行