Won-Sik Kim has over 10 years of experience working as a software engineer. Won-Sik began their career in 2006 at Daum communication, where they worked until 2014. In 2014, they joined DaumKakao, and in 2015 they moved to Kakao Corp, where they are currently employed.
#include <iostream>
#include <string>
#include <vector>
#include <algorithm>
using namespace std;
int main(){
int n;
cin >> n;
vector<int> v;
for(int i = 0; i < n; i++){
int a;
cin >> a;
v.push_back(a);
}
sort(v.begin(), v.end());
cout << v[n - 1] - v[0] << endl;
}
Sign up to view 0 direct reports
Get started