We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1371de2 commit 5397bbeCopy full SHA for 5397bbe
python/168_Excel_Sheet_Column_Title.py
@@ -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