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]
相关文章
- 03-20【leetcode❤python】 168. Excel Sheet Column Title
- 03-20168. Excel Sheet Column Title
- 03-20【easy】168. Excel Sheet Column Title 171. Excel Sheet Column Number
- 03-20LeetCode: 171 Excel Sheet Column Number(easy)
- 03-20LeetCode 171 Excel Sheet Column Number
- 03-20【leetcode❤python】171. Excel Sheet Column Number
- 03-20【一天一道LeetCode】#171. Excel Sheet Column Number
- 03-20【LeetCode】168. Excel Sheet Column Title
- 03-20Leetcode No.168 Excel Sheet Column Title Excel表列名称(c++实现)
- 03-20LeetCode 每日一题 168. Excel Sheet Column Title(数学)