不会写讲讲

2 条评论

  • @ 2021-12-08 20:44:44
    #include <cstdio>
    #include <iostream>
    #include <algorithm>
    
    using namespace std;
    
    const int N = 1010;
    
    int a[N];
    int n;
    
    int main()
    {
        cin >> n;
        for ( int i = 0; i < n; i ++ ) cin >> a[i];
        sort(a, a + n);
        cout << a[n - 1] - a[0];
        return 0;
    }
    
    
    • @ 2021-12-08 20:45:09
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      #include <cstdio>
      #include <iostream>
      #include <algorithm>
      
      using namespace std;
      
      const int N = 1010;
      
      int a[N];
      int n;
      
      int main()
      {
          cin >> n;
          for ( int i = 0; i < n; i ++ ) cin >> a[i];
          sort(a, a + n);
          cout << a[n - 1] - a[0];
          return 0;
      }
      
      
  • @ 2021-12-07 21:38:11

    switch语句用法百度就行了

  • 1

信息

难度
2
分类
(无)
标签
递交数
15
已通过
9
通过率
60%
上传者