Run ID:155713
提交时间: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; }