public class Main{ public static void main(String[] args) { Scanner in = new Scanner(System.in); while (in.hasNextInt()) { int a = in.nextInt(); int[] b = new int[a]; for (int i = 0; i < b.length; i++) { b[i] = in.nextInt(); } Arrays.sort(b); int max = b[0]; int m...