Submission #799262

#TimeUsernameProblemLanguageResultExecution timeMemory
799262tlnk07Autići (COCI22_autici)C++17
50 / 50
39 ms2028 KiB
#include<bits/stdc++.h> using namespace std; long long n, a[100001], mini = INT_MAX, s = 0; int main() { cin >> n; for(int i = 1; i <= n; ++i) { cin >> a[i]; mini = min(mini, a[i]); } for(int i = 1; i <= n; ++i) { s += a[i] + mini; } s -= mini * 2; cout << s; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...