import java.util.Scanner;
public class Main{
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
while(sc.hasNext()){
int n = sc.nextInt();
if (n==0) {
break;
}
int max = Integer.MIN_VALUE;
for (int i = 0; i < n; i++) {
int ac = sc.nextInt();
if (ac>max) {
max = ac;
}
}
System.out.println(max);
}
sc.close();
}
}
HDOJ 2107 Founding of HDU(水题)
最新推荐文章于 2020-06-30 13:24:50 发布