| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 1288571 | mosnter777 | Autići (COCI22_autici) | C++20 | 8 ms | 1104 KiB |
#include <bits/stdc++.h>
using namespace std;
int main(){
ios::sync_with_stdio(false);
cin.tie(nullptr);
long long n;
cin>>n;
vector<long long>d(n);
for (long long i=0;i<n;i++){
cin>>d[i];
}
long long mn=*min_element(d.begin(),d.end());
long long sum = accumulate(d.begin(),d.end(), 0LL);
long long adicto=sum+(n-2)*mn;
cout<<adicto<<endl;
return 0;
}
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
| # | 결과 | 실행 시간 | 메모리 | 채점기 출력 |
|---|---|---|---|---|
| 결과를 불러오는 중입니다… | ||||
