Read an array of integers and print the largest value.
Input / Output
Input: first line is N (the number of elements), second line has N space-separated integers. Output: the maximum value in the array.
Examples
Input
5 3 7 2 9 4
Expected Output
9
Input
4 -1 -5 -2 -8
Expected Output
-1
+ 2 hidden tests checked on Submit.
Main.java is the entry point. Add extra classes for OOP exercises — they compile together.
Run your code to see test results here.