Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
32942 | charlotteJ | 最大跨度值 | C++ | Accepted | 0 MS | 248 KB | 220 | 2023-12-03 16:46:33 |
#include<iostream> using namespace std; int main(){ int n,x,maxn=-1,minn=100000; cin>>n; for(int i=1;i<=n;i++){ cin>>x; if(x>maxn) maxn=x; if(x<minn) minn=x; } cout<<maxn-minn; return 0; }