64ms python solution


  • 0
    J
     class Solution(object):
        def titleToNumber(self, s):
        
        sum = 0
        s = s[::-1]
        for i in range(len(s)):
            sum += (ord(s[i])-64)*pow(26,i)
            
        return sum

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.