leetcode [#168] | GCidea's blog
目录

题目
Given a positive integer, return its corresponding column title as appear in an Excel sheet.
Example:
1 -> A
2 -> B
3 -> C
…
26 -> Z
27 -> AA
28 -> AB
解决方案
1 | public class Solution { |
注意事项
- 本题相当于将输入的数字转换成二十六进制数(只不过不是0-25,而是1-26),然后使用A-Z代表1-26这26个数字。