简简单单 的 题解
2025-12-20 18:34:59
发布于:浙江
8阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
int main() {
int T;
cin>>T;
if(T==0||T==1){
cout<<0;
return 0;
}
int mine=150005,maxe=-150000;
while(T--){
int x;
cin>>x;
maxe=max(maxe,x);
mine=min(mine,x);
}
cout<<maxe-mine;
return 0;
}
这里空空如也







有帮助,赞一个