제출 #553244

#제출 시각아이디문제언어결과실행 시간메모리
553244kappaAutići (COCI22_autici)C++14
50 / 50
62 ms1300 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define pb push_back #define st first #define nd second #define MOD 1000000007 typedef pair<ll, ll> pii; const ll maxn = 2e5 + 5; ll n, sum, mn = INT_MAX; int main(){ cin >> n; for (int i = 0; i < n; i++) { ll x; cin >> x; sum += x; mn = min(mn, x); } cout << (n - 2) * mn + sum; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...