public class Solution {
public String convertToTitle(int n) {
StringBuilder sb = new StringBuilder();
int round = n;
while(round > 0){
sb.append((char) ('A' + (round-1)%26));
round = (round - 1) / 26;
}
return sb.reverse().toString();
}
}
// ""+Integer; Integer.toString(Integer); String.valueOf(Integer);
// char[] chars = "".toCharArray();
熟悉字符串的操作,以及除数,取余的操作