OJ-Problems-Source/HDOJ/2107_autoAC.cpp

20 lines
317 B
C++
Raw Normal View History

#include <stdio.h>
int main()
{
int t,a,max;
while(scanf("%d",&t)!=EOF &&t!=0)
{
max=0;
while(t--)
{
scanf("%d",&a);
if(a>max)
{
max=a;
}
}
printf("%d\n",max);
}
return 0;
}