编辑代码

import java.util.*;
class Main {
	public static void main(String[] args) {
        //JSRUN引擎2.0,支持多达30种语言在线运行,全仿真在线交互输入输出。
        Scanner scan = new Scanner(System.in);
        int [] a = new int[10];
        for(int j = 0;j<10;j++)
        {
            a[j] = scan.nextInt();
        }
        quickSort(a,0,9);
		System.out.println(a[0]+""+a[1]+"");
	}
    public static void quickSort(int[] q, int l, int r) {
        if (l >= r) return;
        int i = l - 1, j = r + 1, x = q[l + r >> 1];
        while (i < j) {
            do i++; while (q[i] < x);
            do j--; while (q[j] > x);
            if (i < j) {
                int temp = q[i];
                q[i] = q[j];
                q[j] = temp;
            }
        }
        quickSort(q, l, j);
        quickSort(q, j + 1, r);
    }
}