/**
* @param args
*/
public static void main(String[] args) {
// TODO Auto-generated method stub
int[] arr = new int[]{1,13,0,3,83,8,0};
System.out.print(getMin(arr));
}
public static String getMin(int[] arr){
int[] minArr = bubbleSort(arr);
//目标字符串
String str="";
String zero="";
for(int i=0;i
zero +="0";
}else{
str = str+""+minArr[i];
}
}
str +=zero; //加上0
return str;
}
public static int[] bubbleSort(int[] score){
//int score[] = {67, 69, 75, 87, 89, 90, 99, 100};
//最多走n-1躺
for(int i=0; i
int temp;
temp=score[j];
score[j]=score[j+1];
score[j+1]=temp;
}
}
}
return score;
}
这个题不难啊,自己想想吧
呃 看上去挺简单的啊