62,623
社区成员
发帖
与我相关
我的任务
分享
import java.io.*;
public class tt {
private final static char BaseTable[] = {
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 1
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 2
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', // 3
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 4
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', // 5
'w', 'x', 'y', 'z', '0', '1', '2', '3', // 6
'4', '5', '6', '7', '8', '9', '+', '/' // 7
};
public static void main(String[] args) {
//String s="13356332255";
try{
BufferedReader streami = new BufferedReader(new InputStreamReader(System.in));
String s=streami.readLine();
long num = Long.parseLong(s);
StringBuilder b = new StringBuilder();
while (num > 1) {
b.append(BaseTable[(int) (num % 64)]);
num >>= 6;
}
System.out.println(b.reverse().toString());
} catch(Exception e){e.printStackTrace();}
}
}
public class tt {
private final static char BaseTable[] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 0
'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 1
'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 2
'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f', // 3
'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', // 4
'o', 'p', 'q', 'r', 's', 't', 'u', 'v', // 5
'w', 'x', 'y', 'z', '0', '1', '2', '3', // 6
'4', '5', '6', '7', '8', '9', '+', '/' // 7
};
public static void main(String[] args) {
long num = 13356332255l;
StringBuilder b = new StringBuilder();
while (num > 1) {
b.append(BaseTable[(int) (num % 64)]);
num >>= 6;
}
System.out.println(b.reverse().toString());
}
}