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_168_Excel Sheet Column Title
- LeetCode Javascript实现 100. Same Tree 171. Excel Sheet Column Number
- 【leetcode❤python】 168. Excel Sheet Column Title
- 【leetcode】Excel Sheet Column Number
- 【LeetCode】168 & 171- Excel Sheet Column Title & Excel Sheet Column Number
- 【leetcode】Excel Sheet Column Title & Excel Sheet Column Number