
import java.util.*;
public class DemoTest5 {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
// 注意 hasNext 和 hasNextLine 的区别
while (in.hasNextLine()) { // 注意 while 处理多个 case
System.out.println(solve(in.nextInt()));
}
}
private static String solve(int a){
StringBuilder sb = new StringBuilder();
while(a>0){
a--;// 减1处理,因为excel是从1开始计数
int yushu = a%26;
sb.insert(0,(char) (yushu+'a'));
a = a /26; // 继续高位计算
}
return sb.toString();
}
}
856

被折叠的 条评论
为什么被折叠?



