| Run ID | 作者 | 问题 | 语言 | 测评结果 | Time | Memory | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 155713 | 安俊积 | 最大值与最小值的差 | C++ | Accepted | 1 MS | 268 KB | 251 | 2026-06-13 08:50:44 |
#include<bits/stdc++.h> using namespace std; int main(){ int n; cin>>n; int j = -1; int t = 10000; int x; for(int i = 1;i <= n;i++){ cin>>x; if(x > j){ j = x; } if(x < t){ t = x; } } cout<<j - t; return 0; }