#include<bits/stdc++.h>
using namespace std;
int ar[100005];
int mn=INT_MAX;
int main(){
int n;
cin>>n;
long long sum=0;
for(int i=0;i<n;i++){
cin>>ar[i];
if(ar[i]<mn){
mn=ar[i];
}
sum+=ar[i];
}
long long x=mn*(n-1)*2;
cout<<x;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
16 ms |
596 KB |
Output is correct |
3 |
Incorrect |
36 ms |
604 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
212 KB |
Output is correct |
2 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
16 ms |
596 KB |
Output is correct |
3 |
Incorrect |
36 ms |
604 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |