Mock CCC '20 Contest 1 J1 - A Rage Tree Problem
Source Code
import java.util.Scanner;
import java.util.Arrays;
public class Main {
public static void main(String[] args) {
Scanner in = new Scanner(System.in);
int[] nums = new int[4];
for(int i = 0; i < 4; i++) {
nums[i] = in.nextInt();
}
Arrays.sort(nums);
System.out.println(nums[0]);
System.out.println(nums[3]);
}
}