public static void main(String[] args) throws Exception {
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
int maximum = Integer.MIN_VALUE;
int num = Integer.parseInt(reader.readLine());
//在此编写你的代码
for (int i = 0; i < num; i++) {
int x = Integer.parseInt(reader.readLine());
maximum = Math.max(maximum, x);
}
if (num > 0)
System.out.println(maximum);
}
最后一题我的思路
GO TO FULL VERSION