Skip to content

Commit 5397bbe

Browse files
authored
Add 168 python solution (qiyuangong#38)
* Add 168_Excel_Sheet_Column_Title.py, by @yuchenliu15
1 parent 1371de2 commit 5397bbe

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
class Solution:
2+
def convertToTitle(self, n: int) -> str:
3+
res = ""
4+
while n > 0:
5+
n -= 1
6+
res = chr(65 + n % 26) + res
7+
n //= 26
8+
return res

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy