제출 #526676

#제출 시각아이디문제언어결과실행 시간메모리
526676siewjhAutići (COCI22_autici)C++17
50 / 50
12 ms312 KiB
#include <iostream> #include <climits> #include <algorithm> using namespace std; typedef long long ll; int main() { ios_base::sync_with_stdio(false); cin.tie(0); cout.tie(0); int nums; cin >> nums; ll minlen = LLONG_MAX, sum = 0; for (int i = 0; i < nums; i++) { ll x; cin >> x; minlen = min(minlen, x); sum += x; } sum -= minlen; cout << minlen * (nums - 1) + sum; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...