十进制转自定义进制(Java版和Python版)(探索ing)

Python68


为了实现excel表格最顶端的字母排序,就绞尽脑汁想了下如何实现自定义进制。俺想的实现方法可能比较复杂。

如果你能简化或操作更方便,请告诉我并互相学习。谢谢

[En]

If you can simplify or have more convenient operation, please tell me about it and learn from each other. Thanks a lot

Java版

这边直接代码过来

```java
public static void main(String[] args) {
String SetStyle = "0123456789ABCDEF";
int digit = SetStyle.length();
String[] get = null;
Scanner sc = new Scanner(System.in);
int num = sc.nextInt();
int origin = num;
int size = 1;
if(num >= digit){

输入验证码查看隐藏内容

扫描二维码关注本站微信公众号 Johngo学长
或者在微信里搜索 Johngo学长
回复 svip 获取验证码
wechat Johngo学长