Submission #701321

#TimeUsernameProblemLanguageResultExecution timeMemory
701321delreyAutići (COCI22_autici)C++14
50 / 50
39 ms1324 KiB
#include <bits/stdc++.h> using namespace std; int main() { long long n, a, minn = 1000000000, sum = 0; cin>>n; for(int i = 0; i < n; i++) { cin>>a; minn = min(a, minn); sum += a; } sum -= minn; long long res = sum + minn * (n - 1); cout<<res<<endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...