This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <iostream>
using namespace std;
#define ll long long
ll N;
ll length[100005];
int main(){
cin >> N;
ll minn = 1000000000;
for(ll i = 0; i < N; i++){
cin >> length[i];
minn = min(minn, length[i]);
}
ll summ = minn * N;
for(ll i = 0; i < N; i++){
summ += length[i];
}
summ -= minn;
summ -= minn;
cout << summ;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |