почему i в цикле должно быть равно 1, а не 0 ?
public class Solution {
public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int N = Integer.parseInt(reader.readLine());
int maximum;
if( N > 0 ) {
maximum = Integer.parseInt(reader.readLine());
for( int i = 1; i < N; i++ ) {
int numInput = Integer.parseInt(reader.readLine());
maximum = numInput > maximum ? numInput : maximum;
}
System.out.println(maximum);
}
else reader.close();
}
}