基础训练 数列特征
#include<iostream>
#include<math.h>
using namespace std;
int main(){
int n, sum=0, maxn=-999999, minn=999999, t;
cin>>n;
for(int i=0; i<n; i++){
cin>>t;
maxn=max(maxn, t);
minn=min(minn, t);
sum+=t;
}
cout<<maxn<<endl<<minn<<endl<<sum<<endl;
return 0;
}