답안 #689708

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
689708 2023-01-29T07:08:16 Z Warinchai Autići (COCI22_autici) C++14
0 / 50
36 ms 1660 KB
#include<bits/stdc++.h>
using namespace std;
int main(){
	int n;
	cin>>n;
	int ar[n+5];
	int mn=INT_MAX;
	int sum=0;
	for(int i=0;i<n;i++){
		cin>>ar[i];
		if(ar[i]<mn){
			mn=ar[i];
		}
		sum+=ar[i];
	}
	cout<<mn*(n-2)+sum;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 13 ms 840 KB Output is correct
3 Incorrect 36 ms 1660 KB Output isn't correct
4 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 300 KB Output is correct
2 Correct 0 ms 212 KB Output is correct
3 Correct 1 ms 212 KB Output is correct
4 Incorrect 1 ms 304 KB Output isn't correct
5 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 212 KB Output is correct
2 Correct 13 ms 840 KB Output is correct
3 Incorrect 36 ms 1660 KB Output isn't correct
4 Halted 0 ms 0 KB -