题目:http://acm.hdu.edu.cn/showproblem.php?pid=2107
#include <stdio.h>
#include <string.h>
int main()
{
int n,max,num;
while(scanf("%d",&n)!=EOF)
{
if(n==0) break;
scanf("%d",&num);
max=num;
for(int i=1;i<n;i++)
{
scanf("%d",&num);
if(num>max) max=num;
}
printf("%d\n",max);
}
return 0;
}