Nathan Coulas

Mock CCC '20 Contest 1 J1 - A Rage Tree Problem

mockccc2020c1j1 JAVA8 11 Feb, 2020 63.658s 3 points

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]);
    }
}