#include<bits/stdc++.h> using namespace std; int main() { int i = 1,n,maxx = -9999999; //初始化最大值maxx为负数 cin >> n; while(i <= n) { int x; cin >> x; if(x > maxx) maxx = x; //x更大,将maxx更新为x i++; } cout << maxx; return 0; }