import java.util.Arrays;
import java.util.Scanner;
public class InsertData
{
public static void main(String[] args){
Scanner sc = new Scanner(System.in);
System.out.println("请输入这个数据");
int N = sc.nextInt();
int []aNumber = new int[]{12,13,8,4,5};
int []bNumber = new int [aNumber.length + 1];
Arrays.sort(aNumber);
System.out.println(aNumber);
int bTiShi = Arrays.binarySearch(aNumber,N);
System.out.println(bTiShi);
if(bTiShi < 0)
{
bTiShi = - bTiShi - 1;
}
System.out.println(bTiShi);
System.arraycopy(aNumber,0,bNumber,0,bTiShi);
System.out.println(Arrays.toString(bNumber));
bNumber[bTiShi] = N;
System.arraycopy(aNumber,bTiShi,bNumber,bTiShi+1,aNumber.length - bTiShi);
System.out.println(Arrays.toString(bNumber));
}
}