【leetcode❤python】 168. Excel Sheet Column Title

class Solution(object):
    def convertToTitle(self, n):
        """
        :type n: int
        :rtype: str
        """
        res=''
        while n>0:
            tmp=n
            n=(n-1)/26
            res+=chr(65+(tmp-1)%26)
        
        return res[::-1]

上一篇:【leetcode❤python】 165. Compare Version Numbers


下一篇:cordova混合开发:Android中native调用javascript