Although the result seems to be the right one, I can't pass the verification. Any idea what am I doing wrong?
package com.codegym.task.task05.task0532;
import java.io.*;
import java.util.Scanner;
import static java.lang.Integer.MIN_VALUE;
/*
Task about algorithms
*/
public class Solution {
public static void main(String[] args) throws Exception {
Scanner reader = new Scanner(System.in);
int maximum = MIN_VALUE;
int numCounter = Integer.parseInt(reader.nextLine());
if (numCounter > 0) {
for (int i = 1; i <= numCounter; i++) {
int number = Integer.parseInt(reader.nextLine());
if (number > maximum) {
maximum = number;
}
}
}
if (maximum != MIN_VALUE) {
System.out.println(maximum);
}
}
}