时间比较匆忙,没有写注释,请谅解下。。。public class Test1 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
suoyou(sc.nextInt());
}
public static double shiSI(double a) {
double b=(9.0/5)*a+32;
return b;
}
public static int round(double a){
int b=(int)(a+0.5);
return b;
}
public static int max(int a,int b,int c){
int max=a>b?a:b;
max=max>c?max:c;
return max;
}
public static void shiliu(int a){
zhuanH(a,15,4);
}
public static void erjin(int a){
zhuanH(a,1,1);
}
public static void bajin(int a){
zhuanH(a,7,3);
}
public static void suoyou(int a){
zhuanH(a,15,4);
zhuanH(a,1,1);
zhuanH(a,7,3);
}
public static void zhuanH(int a,int chusu,int weiyi){
char[] chs={'0','1','2','3','4','5','6','7','8','9','A','B','C','D','E','F'};
char[] arr=new char[32];
int c=arr.length;
while (a!=0){
int t=a&chusu;
arr[--c]=chs[t];
a=a>>>weiyi;
}
for (int i=c;i<arr.length;i++){
System.out.print(arr);
}
|
|