- 求最大跨度值
 788
- @ 2023-9-11 22:41:18
 
#include <bits/stdc++.h>
using namespace std;
int main()
{
  int n,max=0,min=1000,x;
  cin>>n;
  for(int i=1;i<=n;i++)
  {
    cin>>x;
    if(x>max)
    max=x;
    if(x<min)
    min=x;
  }
  cout <<max-min<<endl;
    return 0;
}
        0 comments
  
  No comments so far...
            Information
- ID
 - 788
 - Time
 - 1000ms
 - Memory
 - 256MiB
 - Difficulty
 - 5
 - Tags
 - # Submissions
 - 151
 - Accepted
 - 41
 - Uploaded By