首页 > 代码库 > 1157. The hardest problem

1157. The hardest problem

#include<iostream>
using namespace std;
int main()
{
 int n;
 while(cin>>n&&n!=0&&n<=4){
        int t;
  int max=0;
  for(int i=0;i<n;i++){
   cin>>t;
   if(t>max) max=t;
  }
  cout<<max<<endl;
 }
 return 0;
}

1157. The hardest problem