| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 50266 | liuzhencong | 最大值和最小值的差 | C++ | Accepted | 0 MS | 248 KB | 202 | 2024-08-17 16:00:46 |
#include<bits/stdc++.h> using namespace std; int main(){ int n,max=0,min=10000,x; cin>>n; for(int i=0;i<n;i++){ cin>>x; if(x>max) max=x; if(x<min) min=x; } cout<<max-min; }