为什么运行没有问题但任务不通过?Why does the program run well but the task doesn't pass?
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 maxNum = 0;
while(true) {
String in = reader.readLine();
if(in != null) {
int inNum = Integer.valueOf(in).intValue();
if(maxNum == 0) {
maxNum = inNum;
}else {
maxNum = maxNum < inNum ? inNum : maxNum;
}
}else {
break;
}
}
if(maxNum != 0) {
System.out.print(maxNum);
}
}
}