【无标题】进制问题
class Solution {
public String convertToTitle(int columnNumber) {
String str = "";
char c;
int y;
while(columnNumber > 26){
if(columnNumber % 26 == 0) y = 90;
else y = (columnNumber % 26) + 64;
if(columnNumber % 26 == 0)
columnNumber = columnNumber / 26 - 1;
else columnNumber = columnNumber / 26;
c = (char)y;
str = str + c;
}
str += (char)(c
【无标题】进制问题最先出现在Python成神之路。
共有 0 条评论