Submission #1018966

#TimeUsernameProblemLanguageResultExecution timeMemory
1018966aegAutići (COCI22_autici)C++17
50 / 50
25 ms1368 KiB
#include <bits/stdc++.h> using namespace std; #define int int64_t int32_t main() { int n; cin >> n; vector<int> a(n); for(auto&x:a) cin >> x; int mini = *min_element(a.begin(), a.end()); int sum = 0; for(auto x:a) sum += x; sum += mini*(n - 2); cout << sum << '\n'; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...