
##题目
####Excel Sheet Column Title
Given a positive integer, return its corresponding column title as appear in an Excel sheet.
For example:
1 -> A 2 -> B 3 -> C ... 26 -> Z 27 -> AA 28 -> AB####Credits:
Special thanks to @ifanchu for adding this problem and creating all test cases..
##解题思路
该题每次对数字进行26取模,就能能到其尾数是哪一个字母,然后得到的余数如果大于26,则继续循环处理,否则就在结果的前端插入字母下标位置为余数的字母。
##算法代码
代码采用JAVA实现:
1 |
public class { |




近期评论