could anyone tell me why the last-second requirement won't pass? QAQ
package zh.codegym.task.task05.task0532;
import java.io.*;
/*
有关算法的任务
*/
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());
if (N<=0) {
return;
}
int maximum = 0;
int i = 0;
while(i<N) {
int num = Integer.parseInt(reader.readLine());
i++;
if (num>=maximum)
maximum = num;
}
System.out.println(maximum);
}
}