Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
32303 | zhouhuanyu 玙静 | 最大跨度值 | C++ | Accepted | 0 MS | 240 KB | 281 | 2023-11-27 21:35:23 |
#include <bits/stdc++.h> using namespace std; int main(){ int n, max = -1, min = 10000; cin >> n; int a[n]; for(int i = 0; i < n; i++){ cin >> a[i]; if(a[i] > max){ max = a[i]; } if(a[i] < min){ min = a[i]; } } cout << max - min; return 0; }