Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
56250 | yuboyuan | 最大值和最小值的差 | C++ | Compile Error | 0 MS | 0 KB | 265 | 2024-11-09 22:35:09 |
#include<iostream> #include<cmath> using namespace std; int main() { int n,x,min=-10000,max=10000; cin>>n; for(int i=0;i<n;i++) { cin>>x; min=min(min,x); max=max(max,x); } cout<<max-min; return 0; }